CheckpointStore クラス

CheckpointStore は、選択したストレージ サービスとの対話を処理します。

パーティションの所有権の一覧表示と要求のほか、チェックポイントの一覧表示と保存を行うことができます。

継承
CheckpointStore

コンストラクター

CheckpointStore()

メソッド

claim_ownership

指定したパーティションの一覧の所有権の要求を試みます。

list_checkpoints

選択したストレージ サービスから更新されたチェックポイントを一覧表示します。

list_ownership

選択したストレージ サービスから完全な所有権リストを取得します。

update_checkpoint

選択したストレージ サービス内のオフセット、関連付けられたパーティション、およびコンシューマー グループの指定された情報を使用して、チェックポイントを更新します。

注: クロス言語 EventHubs SDK 間で実行する目的でカスタム チェックポイント ストアを実装する予定の場合は、オフセット値を整数として保持することをお勧めします。

claim_ownership

指定したパーティションの一覧の所有権の要求を試みます。

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

パラメーター

名前 説明
ownership_list
必須

要求するすべての所有権を含むディクショナリを記述できます。

戻り値

説明
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 async list_checkpoints(fully_qualified_namespace: str, eventhub_name: str, consumer_group: str, **kwargs: Any) -> Iterable[Dict[str, Any]]

パラメーター

名前 説明
fully_qualified_namespace
必須
str

イベント ハブが属する完全修飾名前空間。 形式は ".servicebus.windows.net" のようになります。

eventhub_name
必須
str

チェックポイントを含む Event Hubs 名前空間を基準にして、チェックポイントが関連付けられている特定のイベント ハブの名前。

consumer_group
必須
str

チェックポイントが関連付けられているコンシューマー グループの名前。

戻り値

説明
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 async list_ownership(fully_qualified_namespace: str, eventhub_name: str, consumer_group: str, **kwargs: Any) -> Iterable[Dict[str, Any]]

パラメーター

名前 説明
fully_qualified_namespace
必須
str

イベント ハブが属する完全修飾名前空間。 形式は ".servicebus.windows.net" のようになります。

eventhub_name
必須
str

パーティションの所有権が関連付けられている特定のイベント ハブの名前。その名前が含まれる Event Hubs 名前空間を基準にしています。

consumer_group
必須
str

所有権が関連付けられているコンシューマー グループの名前。

戻り値

説明
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 async update_checkpoint(checkpoint: Dict[str, str | int | None], **kwargs: Any) -> None

パラメーター

名前 説明
checkpoint
必須

チェックポイント情報を含むディクテーション:

  • fully_qualified_namespace (str): イベント ハブが属する完全修飾名前空間。 形式は ".servicebus.windows.net" のようになります。

  • eventhub_name (str): チェックポイントを含む Event Hubs 名前空間を基準にして、チェックポイントが関連付けられている特定のイベント ハブの名前。

  • consumer_group (str): チェックポイントが関連付けられているコンシューマー グループの名前。

  • partition_id (str): チェックポイントが作成されるパーティション ID。

  • sequence_number (int): 新しいチェックポイントの EventData シーケンス番号が関連付けられます。

  • offset (str): 新しいチェックポイントの EventData オフセットが関連付けられます。

戻り値

説明