BlobCheckpointStore class

An implementation of CheckpointStore that uses Azure Blob Storage to persist checkpoint data.

Constructors

BlobCheckpointStore(ContainerClient)

Methods

claimOwnership(PartitionOwnership[])

Claim ownership of a list of partitions. This will return the list of partitions that were successfully claimed.

listCheckpoints(string, string, string)

Lists all the checkpoints in a data store for a given namespace, eventhub and consumer group.

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.

updateCheckpoint(Checkpoint)

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

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.