Skip to content

EventHubCheckpointer Methods

This class stores EventHub partition checkpointer information (a partition offset) in azure table storage.

Create(AzureTableStreamCheckpointerOptions, string, string, string, ILoggerFactory)

static
View source
public static Task<IStreamQueueCheckpointer<string>> Create(AzureTableStreamCheckpointerOptions options, string streamProviderName, string partition, string serviceId, ILoggerFactory loggerFactory)
Factory function that creates and initializes the checkpointer

Parameters

optionsAzureTableStreamCheckpointerOptions
streamProviderNamestring
partitionstring
serviceIdstring
loggerFactoryILoggerFactory

FlushAsync(CancellationToken)

View source
public Task FlushAsync(CancellationToken cancellationToken)
Flushes any pending checkpoint to persistent storage. Awaits any in-progress save, then persists the latest offset if it has advanced beyond the last saved value.

Parameters

cancellationTokenCancellationToken
The cancellation token.

Update(string, DateTime)

View source
public void Update(string offset, DateTime utcNow)
Updates the checkpoint. This is a best effort. It does not always update the checkpoint. The latest offset is always tracked in memory so that EventHubCheckpointer can persist it on shutdown.

Parameters

offsetstring
utcNowDateTime