Skip to content

EventHubCheckpointer Methods

This class stores EventHub partition checkpoint information 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.

Load

View source
[System.Obsolete(Use the overload which accepts a CancellationToken.)]
public Task<string> Load()
Loads a checkpoint

Load(CancellationToken)

View source
public Task<string> Load(CancellationToken cancellationToken)
Loads a checkpoint.

Parameters

cancellationTokenCancellationToken
The cancellation token.

Returns

The checkpoint.

Update(string, DateTime)

View source
[System.Obsolete(Use the overload which accepts a CancellationToken.)]
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

Update(string, DateTime, CancellationToken)

View source
public void Update(string offset, DateTime utcNow, CancellationToken cancellationToken)
Updates the checkpoint.

Parameters

offsetstring
The checkpoint offset.
utcNowDateTime
The current UTC time.
cancellationTokenCancellationToken
The cancellation token.