Skip to content

IStreamQueueCheckpointer<TCheckpoint> Methods

Functionality for checkpointing a stream.

FlushAsync(CancellationToken)

virtual
View source
public virtual Task FlushAsync(CancellationToken cancellationToken)
Flushes any pending checkpoint to persistent storage, ensuring the latest offset is durably saved. Called during shutdown or rebalancing to prevent message replay on restart.

Parameters

cancellationTokenCancellationToken
The cancellation token.

Returns

A System.Threading.Tasks.Task representing the flush operation.

Load

abstract
public abstract Task<TCheckpoint> Load()
Loads the checkpoint.

Returns

The checkpoint.

Update(TCheckpoint, DateTime)

abstract
public abstract void Update(TCheckpoint offset, DateTime utcNow)
Updates the checkpoint.

Parameters

offsetTCheckpoint
The offset.
utcNowDateTime
The current UTC time.