public class BlobCheckpointStore extends Object implements CheckpointStore
CheckpointStore that uses
Storage Blobs
for persisting partition ownership and checkpoint information. EventProcessors can use
this implementation to load balance and update checkpoints.EventProcessorClient| Modifier and Type | Field and Description |
|---|---|
static String |
EMPTY_STRING |
| Constructor and Description |
|---|
BlobCheckpointStore(com.azure.storage.blob.BlobContainerAsyncClient blobContainerAsyncClient)
Creates an instance of BlobCheckpointStore.
|
| Modifier and Type | Method and Description |
|---|---|
Flux<PartitionOwnership> |
claimOwnership(List<PartitionOwnership> requestedPartitionOwnerships)
This method is called by the
EventProcessorClient to claim ownership of a list of partitions. |
Flux<Checkpoint> |
listCheckpoints(String fullyQualifiedNamespace,
String eventHubName,
String consumerGroup) |
Flux<PartitionOwnership> |
listOwnership(String fullyQualifiedNamespace,
String eventHubName,
String consumerGroup)
This method is called by the
EventProcessorClient to get the list of all existing partition ownership
from the Storage Blobs. |
Mono<Void> |
updateCheckpoint(Checkpoint checkpoint)
Updates the checkpoint in Storage Blobs for a partition.
|
public static final String EMPTY_STRING
public BlobCheckpointStore(com.azure.storage.blob.BlobContainerAsyncClient blobContainerAsyncClient)
blobContainerAsyncClient - The BlobContainerAsyncClient this instance will use to read and update
blobs in the storage container.public Flux<PartitionOwnership> listOwnership(String fullyQualifiedNamespace, String eventHubName, String consumerGroup)
EventProcessorClient to get the list of all existing partition ownership
from the Storage Blobs. Could return empty results if there are is no existing ownership information.listOwnership in interface CheckpointStoreeventHubName - The Event Hub name to get ownership information.consumerGroup - The consumer group name.public Flux<Checkpoint> listCheckpoints(String fullyQualifiedNamespace, String eventHubName, String consumerGroup)
listCheckpoints in interface CheckpointStorepublic Flux<PartitionOwnership> claimOwnership(List<PartitionOwnership> requestedPartitionOwnerships)
EventProcessorClient to claim ownership of a list of partitions. This will
return the list of partitions that were owned successfully.claimOwnership in interface CheckpointStorerequestedPartitionOwnerships - List of partition ownerships this instance is requesting to own.public Mono<Void> updateCheckpoint(Checkpoint checkpoint)
updateCheckpoint in interface CheckpointStorecheckpoint - Checkpoint information containing sequence number and offset to be stored for this partition.Visit the Azure for Java Developers site for more Java documentation, including quick starts, tutorials, and code samples.