BlobCheckpointStore class
An implementation of CheckpointStore that uses Azure Blob Storage to persist checkpoint data.
Constructors
Blob |
Methods
claim |
Claim ownership of a list of partitions. This will return the list of partitions that were successfully claimed. |
list |
Lists all the checkpoints in a data store for a given namespace, eventhub and consumer group. |
list |
Get the list of all existing partition ownership from the underlying data store. May return empty
results if there are is no existing ownership information.
Partition Ownership contains the information on which |
update |
Updates the checkpoint in the data store for a partition. |
Constructor Details
BlobCheckpointStore(ContainerClient)
new BlobCheckpointStore(containerClient: ContainerClient)
Parameters
- containerClient
- ContainerClient
Method Details
claimOwnership(PartitionOwnership[])
Claim ownership of a list of partitions. This will return the list of partitions that were successfully claimed.
function claimOwnership(partitionOwnership: PartitionOwnership[]): Promise<PartitionOwnership[]>
Parameters
- partitionOwnership
The list of partition ownership this instance is claiming to own.
Returns
Promise<PartitionOwnership[]>
A list partitions this instance successfully claimed ownership.
listCheckpoints(string, string, string)
Lists all the checkpoints in a data store for a given namespace, eventhub and consumer group.
function listCheckpoints(fullyQualifiedNamespace: string, eventHubName: string, consumerGroup: string): Promise<Checkpoint[]>
Parameters
- fullyQualifiedNamespace
-
string
The fully qualified Event Hubs namespace. This is likely to be similar to .servicebus.windows.net.
- eventHubName
-
string
The event hub name.
- consumerGroup
-
string
The consumer group name.
Returns
Promise<Checkpoint[]>
listOwnership(string, string, string)
Get the list of all existing partition ownership from the underlying data store. May return empty
results if there are is no existing ownership information.
Partition Ownership contains the information on which EventHubConsumerClient
subscribe call is currently processing the partition.
function listOwnership(fullyQualifiedNamespace: string, eventHubName: string, consumerGroup: string): Promise<PartitionOwnership[]>
Parameters
- fullyQualifiedNamespace
-
string
The fully qualified Event Hubs namespace. This is likely to be similar to .servicebus.windows.net.
- eventHubName
-
string
The event hub name.
- consumerGroup
-
string
The consumer group name.
Returns
Promise<PartitionOwnership[]>
Partition ownership details of all the partitions that have had an owner.
updateCheckpoint(Checkpoint)
Updates the checkpoint in the data store for a partition.
function updateCheckpoint(checkpoint: Checkpoint): Promise<void>
Parameters
- checkpoint
- Checkpoint
The checkpoint.
Returns
Promise<void>
The new etag on successful update.