@azure/eventhubs-checkpointstore-blob
Version:
An Azure Storage Blob solution to store checkpoints when using Event Hubs.
68 lines • 3.92 kB
TypeScript
import type { CheckpointStore, PartitionOwnership, Checkpoint, OperationOptions } from "@azure/event-hubs";
import type { ContainerClientLike } from "./storageBlobInterfaces.js";
/**
* An implementation of CheckpointStore that uses Azure Blob Storage to persist checkpoint data.
*/
export declare class BlobCheckpointStore implements CheckpointStore {
private _containerClient;
/**
* Constructs a new instance of {@link BlobCheckpointStore}
* @param containerClient - An instance of a storage blob ContainerClient.
*/
constructor(containerClient: ContainerClientLike);
/**
* 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.
*
* @param fullyQualifiedNamespace - The fully qualified Event Hubs namespace. This is likely to be similar to
* <yournamespace>.servicebus.windows.net.
* @param eventHubName - The event hub name.
* @param consumerGroup - The consumer group name.
* @param options - A set of options that can be specified to influence the behavior of this method.
* - `abortSignal`: A signal used to request operation cancellation.
* - `tracingOptions`: Options for configuring tracing.
* @returns Partition ownership details of all the partitions that have had an owner.
*/
listOwnership(fullyQualifiedNamespace: string, eventHubName: string, consumerGroup: string, options?: OperationOptions): Promise<PartitionOwnership[]>;
/**
* Claim ownership of a list of partitions. This will return the list of partitions that were
* successfully claimed.
*
* @param partitionOwnership - The list of partition ownership this instance is claiming to own.
* @param options - A set of options that can be specified to influence the behavior of this method.
* - `abortSignal`: A signal used to request operation cancellation.
* - `tracingOptions`: Options for configuring tracing.
* @returns A list partitions this instance successfully claimed ownership.
*/
claimOwnership(partitionOwnership: PartitionOwnership[], options?: OperationOptions): Promise<PartitionOwnership[]>;
/**
* Lists all the checkpoints in a data store for a given namespace, eventhub and consumer group.
*
* @param fullyQualifiedNamespace - The fully qualified Event Hubs namespace. This is likely to be similar to
* <yournamespace>.servicebus.windows.net.
* @param eventHubName - The event hub name.
* @param consumerGroup - The consumer group name.
* @param options - A set of options that can be specified to influence the behavior of this method.
* - `abortSignal`: A signal used to request operation cancellation.
* - `tracingOptions`: Options for configuring tracing.
*/
listCheckpoints(fullyQualifiedNamespace: string, eventHubName: string, consumerGroup: string, options?: OperationOptions): Promise<Checkpoint[]>;
/**
* Updates the checkpoint in the data store for a partition.
*
* @param checkpoint - The checkpoint.
* @param options - A set of options that can be specified to influence the behavior of this method.
* - `abortSignal`: A signal used to request operation cancellation.
* - `tracingOptions`: Options for configuring tracing.
* @returns The new etag on successful update.
*/
updateCheckpoint(checkpoint: Checkpoint, options?: OperationOptions): Promise<void>;
private static getBlobPrefix;
private _setBlobMetadata;
}
/**
* @internal
*/
export declare function parseIntOrThrow(blobName: string, fieldName: string, numStr: string | undefined): number;
//# sourceMappingURL=blobCheckpointStore.d.ts.map