다음을 통해 공유


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]]

매개 변수

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

매개 변수

Name Description
fully_qualified_namespace
필수
str

Event Hub가 속한 정규화된 네임스페이스입니다. 형식은 ".servicebus.windows.net"와 같습니다.

eventhub_name
필수
str

검사점이 포함된 Event Hubs 네임스페이스를 기준으로 검사점이 연결된 특정 Event Hub의 이름입니다.

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

매개 변수

Name Description
fully_qualified_namespace
필수
str

Event Hub가 속한 정규화된 네임스페이스입니다. 형식은 ".servicebus.windows.net"와 같습니다.

eventhub_name
필수
str

파티션 소유권이 포함된 Event Hubs 네임스페이스를 기준으로 파티션 소유권이 연결된 특정 Event Hub의 이름입니다.

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

매개 변수

Name Description
checkpoint
필수

검사점 정보를 포함하는 받아쓰기:

  • fully_qualified_namespace (str): Event Hub가 속한 정규화된 네임스페이스입니다. 형식은 ".servicebus.windows.net"와 같습니다.

  • eventhub_name (str): 검사점이 포함된 Event Hubs 네임스페이스를 기준으로 검사점이 연결된 특정 Event Hub의 이름입니다.

  • consumer_group (str): 검사점이 연결된 소비자 그룹의 이름입니다.

  • partition_id (str): 검사점이 만들어지는 파티션 ID입니다.

  • sequence_number (int): 새 검사점의 EventData 시퀀스 번호가 연결됩니다.

  • offset (str): 새 검사점의 EventData 오프셋이 연결됩니다.

반환

형식 Description