共用方式為


CheckpointStore 類別

CheckpointStore 會處理與所選儲存體服務的互動。

它可以列出和宣告資料分割擁有權,以及列出和儲存檢查點。

繼承
builtins.object
CheckpointStore

建構函式

CheckpointStore()

方法

claim_ownership

嘗試宣告指定資料分割清單的擁有權。

list_checkpoints

列出所選儲存體服務的更新檢查點。

list_ownership

從所選的儲存體服務擷取完整的擁有權清單。

update_checkpoint

使用所選儲存體服務中位移、相關聯分割區和取用者群組的指定資訊,更新檢查點。

注意:如果您打算實作自訂檢查點存放區,以在跨語言 EventHubs SDK 之間執行,建議您將位移值保存為整數。

claim_ownership

嘗試宣告指定資料分割清單的擁有權。

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

參數

名稱 Description
ownership_list
必要

可逐一查看包含要宣告之所有擁有權的字典。

傳回

類型 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

列出所選儲存體服務的更新檢查點。

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

參數

名稱 Description
fully_qualified_namespace
必要
str

事件中樞所屬的完整命名空間。 格式就像 「.servicebus.windows.net」。

eventhub_name
必要
str

與包含檢查點之事件中樞命名空間相關的特定事件中樞名稱。

consumer_group
必要
str

檢查點相關聯的取用者群組名稱。

傳回

類型 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

從所選的儲存體服務擷取完整的擁有權清單。

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

參數

名稱 Description
fully_qualified_namespace
必要
str

事件中樞所屬的完整命名空間。 格式就像 「.servicebus.windows.net」。

eventhub_name
必要
str

資料分割擁有權的特定事件中樞名稱,相對於包含它的事件中樞命名空間。

consumer_group
必要
str

擁有權相關聯的取用者群組名稱。

傳回

類型 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

使用所選儲存體服務中位移、相關聯分割區和取用者群組的指定資訊,更新檢查點。

注意:如果您打算實作自訂檢查點存放區,以在跨語言 EventHubs SDK 之間執行,建議您將位移值保存為整數。

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

參數

名稱 Description
checkpoint
必要

包含檢查點資訊的聽寫:

  • fully_qualified_namespace (str) :事件中樞所屬的完整命名空間。 格式就像 「.servicebus.windows.net」。

  • eventhub_name str (str) :與檢查點相關聯的特定事件中樞名稱,相對於包含檢查點的事件中樞命名空間。

  • consumer_group (str) :檢查點相關聯的取用者群組名稱。

  • partition_id (str) :建立檢查點的分割區識別碼。

  • sequence_number (int) :新檢查點的 EventData 序號將會與相關聯。

  • offset (str) :新檢查點的 EventData 位移將會與相關聯。

傳回

類型 Description