CheckpointStore Classe
A CheckpointStore trata da interação com o serviço de armazenamento escolhido.
Pode listar e reclamar propriedades de partição, bem como listar e guardar postos de controlo.
- Herança
-
CheckpointStore
Construtor
CheckpointStore()
Métodos
claim_ownership |
Tenta reclamar a propriedade para uma lista de divisórias especificadas. |
list_checkpoints |
Listar os pontos de verificação atualizados do serviço de armazenamento escolhido. |
list_ownership |
Recupera uma lista completa de propriedade do serviço de armazenamento escolhido. |
update_checkpoint |
Atualizações o ponto de verificação utilizando as informações dadas para o offset, partição associada e grupo de consumidores no serviço de armazenamento escolhido. Nota: Se planeia implementar uma loja de controlo personalizada com a intenção de funcionar entre os SDKs EventHubs cross-language, recomenda-se que persista o valor de compensação como número inteiro. |
claim_ownership
Tenta reclamar a propriedade para uma lista de divisórias especificadas.
abstract async claim_ownership(ownership_list: Iterable[Dict[str, Any]], **kwargs: Any) -> Iterable[Dict[str, Any]]
Parâmetros
Name | Description |
---|---|
ownership_list
Necessário
|
Iterável de dicionários que contêm todas as propriedades para reivindicar. |
Devoluções
Tipo | Description |
---|---|
Iterable[Dict[str,Any]], Iterable <xref:of> <xref:dictionaries> <xref:containing> <xref:azure.eventhub.amqp.AmqpMessageBodyType.partition> <xref:ownership> <xref:information>:fully_qualified_namespace (str): <xref:The> <xref:fully> <xref:qualified> <xref:namespace> <xref:that> <xref:the> <xref:Event> <xref:Hub> <xref:belongs> <xref:to.> <xref:The> <xref:azure.eventhub.amqp.AmqpMessageBodyType.format> <xref:is> <xref:like> “<<xref:namespace>><xref:.servicebus.windows.net>”<xref:.> eventhub_name (str): <xref:The> <xref:name> <xref:of> <xref:the> <xref:specific> <xref:Event> <xref:Hub> <xref:the> <xref:checkpoint> <xref:is> <xref:associated> <xref:with>, <xref:relative> <xref:to> <xref:the> <xref:Event> <xref:Hubs> <xref:namespace> <xref:that> <xref:contains> <xref:it.> <xref:consumer_group> (str): <xref:The> <xref:name> <xref:of> <xref:the> <xref:consumer> <xref:group> <xref:the> <xref:ownership> <xref:are> <xref:associated> <xref:with.> <xref:partition_id> (str): <xref:The> <xref:azure.eventhub.amqp.AmqpMessageBodyType.partition> <xref:ID> <xref:which> <xref:the> <xref:checkpoint> <xref:is> <xref:created> <xref:for.> <xref:owner_id> (str): <xref:A> <xref:UUID> <xref:representing> <xref:the> <xref:owner> <xref:attempting> <xref:to> <xref:claim> <xref:this> <xref:partition.> <xref:last_modified_time> (<xref:UTC> datetime): <xref:The> <xref:last> time <xref:this> <xref:ownership> <xref:was> <xref:claimed.> <xref:etag> (str): <xref:The> <xref:Etag> <xref:value> <xref:for> <xref:the> <xref:last> time <xref:this> <xref:ownership> <xref:was> <xref:modified.> Optional <xref:depending> <xref:on> <xref:storage> <xref:implementation.>
|
list_checkpoints
Listar os pontos de verificação atualizados do serviço de armazenamento escolhido.
abstract async list_checkpoints(fully_qualified_namespace: str, eventhub_name: str, consumer_group: str, **kwargs: Any) -> Iterable[Dict[str, Any]]
Parâmetros
Name | Description |
---|---|
fully_qualified_namespace
Necessário
|
O espaço de nome totalmente qualificado a que pertence o Centro de Eventos. O formato é como ".servicebus.windows.net". |
eventhub_name
Necessário
|
O nome do Centro de Eventos específico com o que os pontos de verificação estão associados, em relação ao espaço de nomes do Event Hubs que o contém. |
consumer_group
Necessário
|
O nome do grupo de consumidores a que os postos de controlo estão associados. |
Devoluções
Tipo | Description |
---|---|
Iterable[Dict[str,Any]], Iterable <xref:of> <xref:dictionaries> <xref:containing> <xref:azure.eventhub.amqp.AmqpMessageBodyType.partition> <xref:checkpoint> <xref:information>:fully_qualified_namespace (str): <xref:The> <xref:fully> <xref:qualified> <xref:namespace> <xref:that> <xref:the> <xref:Event> <xref:Hub> <xref:belongs> <xref:to.> <xref:The> <xref:azure.eventhub.amqp.AmqpMessageBodyType.format> <xref:is> <xref:like> “<<xref:namespace>><xref:.servicebus.windows.net>”<xref:.> eventhub_name (str): <xref:The> <xref:name> <xref:of> <xref:the> <xref:specific> <xref:Event> <xref:Hub> <xref:the> <xref:checkpoints> <xref:are> <xref:associated> <xref:with>, <xref:relative> <xref:to> <xref:the> <xref:Event> <xref:Hubs> <xref:namespace> <xref:that> <xref:contains> <xref:it.> <xref:consumer_group> (str): <xref:The> <xref:name> <xref:of> <xref:the> <xref:consumer> <xref:group> <xref:the> <xref:checkpoints> <xref:are> <xref:associated> <xref:with.> <xref:partition_id> (str): <xref:The> <xref:azure.eventhub.amqp.AmqpMessageBodyType.partition> <xref:ID> <xref:which> <xref:the> <xref:checkpoint> <xref:is> <xref:created> <xref:for.> sequence_number (int): <xref:The> <xref:sequence> <xref:number> <xref:of> <xref:the> <xref:EventData.> offset (str): <xref:The> offset <xref:of> <xref:the> <xref:EventData.>
|
list_ownership
Recupera uma lista completa de propriedade do serviço de armazenamento escolhido.
abstract async list_ownership(fully_qualified_namespace: str, eventhub_name: str, consumer_group: str, **kwargs: Any) -> Iterable[Dict[str, Any]]
Parâmetros
Name | Description |
---|---|
fully_qualified_namespace
Necessário
|
O espaço de nome totalmente qualificado a que pertence o Centro de Eventos. O formato é como ".servicebus.windows.net". |
eventhub_name
Necessário
|
O nome do Event Hub específico com que as propriedades da partição estão associadas, em relação ao espaço de nomes do Event Hubs que o contém. |
consumer_group
Necessário
|
O nome do grupo de consumidores a que as propriedades estão associadas. |
Devoluções
Tipo | Description |
---|---|
Iterable[Dict[str, Any]], Iterable <xref:of> <xref:dictionaries> <xref:containing> <xref:azure.eventhub.amqp.AmqpMessageBodyType.partition> <xref:ownership> <xref:information>:fully_qualified_namespace (str): <xref:The> <xref:fully> <xref:qualified> <xref:namespace> <xref:that> <xref:the> <xref:Event> <xref:Hub> <xref:belongs> <xref:to.> <xref:The> <xref:azure.eventhub.amqp.AmqpMessageBodyType.format> <xref:is> <xref:like> “<<xref:namespace>><xref:.servicebus.windows.net>”<xref:.> eventhub_name (str): <xref:The> <xref:name> <xref:of> <xref:the> <xref:specific> <xref:Event> <xref:Hub> <xref:the> <xref:checkpoint> <xref:is> <xref:associated> <xref:with>, <xref:relative> <xref:to> <xref:the> <xref:Event> <xref:Hubs> <xref:namespace> <xref:that> <xref:contains> <xref:it.> <xref:consumer_group> (str): <xref:The> <xref:name> <xref:of> <xref:the> <xref:consumer> <xref:group> <xref:the> <xref:ownership> <xref:are> <xref:associated> <xref:with.> <xref:partition_id> (str): <xref:The> <xref:azure.eventhub.amqp.AmqpMessageBodyType.partition> <xref:ID> <xref:which> <xref:the> <xref:checkpoint> <xref:is> <xref:created> <xref:for.> <xref:owner_id> (str): <xref:A> <xref:UUID> <xref:representing> <xref:the> <xref:current> <xref:owner> <xref:of> <xref:this> <xref:partition.> <xref:last_modified_time> (<xref:UTC> datetime): <xref:The> <xref:last> time <xref:this> <xref:ownership> <xref:was> <xref:claimed.> <xref:etag> (str): <xref:The> <xref:Etag> <xref:value> <xref:for> <xref:the> <xref:last> time <xref:this> <xref:ownership> <xref:was> <xref:modified.> Optional <xref:depending> <xref:on> <xref:storage> <xref:implementation.>
|
update_checkpoint
Atualizações o ponto de verificação utilizando as informações dadas para o offset, partição associada e grupo de consumidores no serviço de armazenamento escolhido.
Nota: Se planeia implementar uma loja de controlo personalizada com a intenção de funcionar entre os SDKs EventHubs cross-language, recomenda-se que persista o valor de compensação como número inteiro.
abstract async update_checkpoint(checkpoint: Dict[str, str | int | None], **kwargs: Any) -> None
Parâmetros
Name | Description |
---|---|
checkpoint
Necessário
|
Um dict que contém informações sobre o ponto de verificação:
|
Devoluções
Tipo | Description |
---|---|
Azure SDK for Python
Comentários
https://aka.ms/ContentUserFeedback.
Brevemente: Ao longo de 2024, vamos descontinuar progressivamente o GitHub Issues como mecanismo de feedback para conteúdos e substituí-lo por um novo sistema de feedback. Para obter mais informações, veja:Submeter e ver comentários