CheckpointStore Klasa

CheckpointStore zajmuje się interakcją z wybraną usługą magazynu.

Może wyświetlać listę i oświadczenia własności partycji, a także wyświetlać listę i zapisywać punkty kontrolne.

Dziedziczenie
builtins.object
CheckpointStore

Konstruktor

CheckpointStore()

Metody

claim_ownership

Próbuje ubiegać się o własność dla listy określonych partycji.

list_checkpoints

Wyświetl listę zaktualizowanych punktów kontrolnych z wybranej usługi magazynu.

list_ownership

Pobiera pełną listę własności z wybranej usługi magazynu.

update_checkpoint

Aktualizacje punkt kontrolny przy użyciu podanych informacji dotyczących przesunięcia, skojarzonej partycji i grupy odbiorców w wybranej usłudze magazynu.

Uwaga: Jeśli planujesz zaimplementować niestandardowy magazyn punktów kontrolnych z zamiarem uruchamiania między zestawami SDK usługi EventHubs w wielu językach, zaleca się utrwalanie wartości przesunięcia jako liczby całkowitej.

claim_ownership

Próbuje ubiegać się o własność dla listy określonych partycji.

abstract claim_ownership(ownership_list: Iterable[Dict[str, Any]], **kwargs: Any) -> Iterable[Dict[str, Any]]

Parametry

Nazwa Opis
ownership_list
Wymagane

Iterable słowników zawierających wszystkie własności do roszczenia.

Zwraca

Typ Opis
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

Wyświetl listę zaktualizowanych punktów kontrolnych z wybranej usługi magazynu.

abstract list_checkpoints(fully_qualified_namespace: str, eventhub_name: str, consumer_group: str, **kwargs: Any) -> Iterable[Dict[str, Any]]

Parametry

Nazwa Opis
fully_qualified_namespace
Wymagane
str

W pełni kwalifikowana przestrzeń nazw, do którego należy centrum zdarzeń. Format jest podobny do ".servicebus.windows.net".

eventhub_name
Wymagane
str

Nazwa określonego centrum zdarzeń, z którym są skojarzone punkty kontrolne, względem przestrzeni nazw usługi Event Hubs, która ją zawiera.

consumer_group
Wymagane
str

Nazwa grupy odbiorców, z z których są skojarzone punkty kontrolne.

Zwraca

Typ Opis
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

Pobiera pełną listę własności z wybranej usługi magazynu.

abstract list_ownership(fully_qualified_namespace: str, eventhub_name: str, consumer_group: str, **kwargs: Any) -> Iterable[Dict[str, Any]]

Parametry

Nazwa Opis
fully_qualified_namespace
Wymagane
str

W pełni kwalifikowana przestrzeń nazw, do którego należy centrum zdarzeń. Format jest podobny do ".servicebus.windows.net".

eventhub_name
Wymagane
str

Nazwa określonego centrum zdarzeń, z którym są skojarzone własność partycji, względem przestrzeni nazw usługi Event Hubs, która ją zawiera.

consumer_group
Wymagane
str

Nazwa grupy odbiorców, z których są skojarzone własność.

Zwraca

Typ Opis
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

Aktualizacje punkt kontrolny przy użyciu podanych informacji dotyczących przesunięcia, skojarzonej partycji i grupy odbiorców w wybranej usłudze magazynu.

Uwaga: Jeśli planujesz zaimplementować niestandardowy magazyn punktów kontrolnych z zamiarem uruchamiania między zestawami SDK usługi EventHubs w wielu językach, zaleca się utrwalanie wartości przesunięcia jako liczby całkowitej.

abstract update_checkpoint(checkpoint: Dict[str, str | int | None], **kwargs: Any) -> None

Parametry

Nazwa Opis
checkpoint
Wymagane

Dykt zawierający informacje o punkcie kontrolnym:

  • fully_qualified_namespace (str): w pełni kwalifikowana przestrzeń nazw, do którego należy centrum zdarzeń. Format jest podobny do ".servicebus.windows.net".

  • eventhub_name (str): nazwa określonego centrum zdarzeń, z którym jest skojarzony punkt kontrolny, względem przestrzeni nazw usługi Event Hubs, która ją zawiera.

  • consumer_group (str): nazwa grupy odbiorców, z która jest skojarzona punkt kontrolny.

  • partition_id (str): identyfikator partycji, dla którego jest tworzony punkt kontrolny.

  • sequence_number (int): numer sekwencji nowego punktu kontrolnego EventData zostanie skojarzony.

  • przesunięcie (str): przesunięcie nowego punktu kontrolnego EventData zostanie skojarzone.

Zwraca

Typ Opis