CheckpointStore Classe
CheckpointStore lida com a interação com o serviço de armazenamento escolhido.
Ele pode listar e reivindicar propriedades de partição, bem como listar e salvar pontos de verificação.
- Herança
-
builtins.objectCheckpointStore
Construtor
CheckpointStore()
Métodos
claim_ownership |
Tenta reivindicar a propriedade de uma lista de partições especificadas. |
list_checkpoints |
Liste os pontos de verificação atualizados do serviço de armazenamento escolhido. |
list_ownership |
Recupera uma lista de propriedade completa do serviço de armazenamento escolhido. |
update_checkpoint |
Atualizações o ponto de verificação usando as informações fornecidas para o deslocamento, a partição associada e o grupo de consumidores no serviço de armazenamento escolhido. Observação: se você planeja implementar um repositório de ponto de verificação personalizado com a intenção de executar entre SDKs eventHubs entre idiomas, é recomendável persistir o valor de deslocamento como um inteiro. |
claim_ownership
Tenta reivindicar a propriedade de uma lista de partições especificadas.
abstract claim_ownership(ownership_list: Iterable[Dict[str, Any]], **kwargs: Any) -> Iterable[Dict[str, Any]]
Parâmetros
Nome | Description |
---|---|
ownership_list
Obrigatório
|
Iterável de dicionários que contêm todas as propriedades a serem reivindicados. |
Retornos
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
Liste os pontos de verificação atualizados do serviço de armazenamento escolhido.
abstract list_checkpoints(fully_qualified_namespace: str, eventhub_name: str, consumer_group: str, **kwargs: Any) -> Iterable[Dict[str, Any]]
Parâmetros
Nome | Description |
---|---|
fully_qualified_namespace
Obrigatório
|
O namespace totalmente qualificado ao qual o Hub de Eventos pertence. O formato é como ".servicebus.windows.net". |
eventhub_name
Obrigatório
|
O nome do Hub de Eventos específico ao qual os pontos de verificação estão associados, em relação ao namespace dos Hubs de Eventos que o contém. |
consumer_group
Obrigatório
|
O nome do grupo de consumidores ao qual os pontos de verificação estão associados. |
Retornos
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 de propriedade completa do serviço de armazenamento escolhido.
abstract list_ownership(fully_qualified_namespace: str, eventhub_name: str, consumer_group: str, **kwargs: Any) -> Iterable[Dict[str, Any]]
Parâmetros
Nome | Description |
---|---|
fully_qualified_namespace
Obrigatório
|
O namespace totalmente qualificado ao qual o Hub de Eventos pertence. O formato é como ".servicebus.windows.net". |
eventhub_name
Obrigatório
|
O nome do Hub de Eventos específico ao qual as propriedades de partição estão associadas, em relação ao namespace dos Hubs de Eventos que o contém. |
consumer_group
Obrigatório
|
O nome do grupo de consumidores ao qual as propriedades estão associadas. |
Retornos
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 usando as informações fornecidas para o deslocamento, a partição associada e o grupo de consumidores no serviço de armazenamento escolhido.
Observação: se você planeja implementar um repositório de ponto de verificação personalizado com a intenção de executar entre SDKs eventHubs entre idiomas, é recomendável persistir o valor de deslocamento como um inteiro.
abstract update_checkpoint(checkpoint: Dict[str, str | int | None], **kwargs: Any) -> None
Parâmetros
Nome | Description |
---|---|
checkpoint
Obrigatório
|
Um ditado que contém informações de ponto de verificação:
|
Retornos
Tipo | Description |
---|---|
Azure SDK for Python