Skip to main content
Table of Contents

Interface IProjectionCheckpointStore

Namespace
Stratara.Abstractions.Projections
Assembly
Stratara.Abstractions.dll

Reads and writes the position a store-reading consumer resumes after, one per consumer and partition. A position is only meaningful to the reader that produced it, so every read names the reader it expects and a checkpoint written under another reader is refused rather than misread.

public interface IProjectionCheckpointStore
Extension Methods

Methods

GetAsync(string, int, string, CancellationToken)

Returns the stored position, or 0 where none exists.

Task<long> GetAsync(string projection, int partition, string reader, CancellationToken cancellationToken = default)

Parameters

projection string

The consumer, by the name the framework gives it.

partition int

The partition.

reader string

The name of the reader whose positions are expected.

cancellationToken CancellationToken

Propagated to the store.

Returns

Task<long>

The position to resume after.

Exceptions

InvalidOperationException

A checkpoint exists but was written under a different reader.

SetAsync(string, int, string, long, CancellationToken)

Stores a position, replacing the previous one.

Task SetAsync(string projection, int partition, string reader, long position, CancellationToken cancellationToken = default)

Parameters

projection string

The consumer, by the name the framework gives it.

partition int

The partition.

reader string

The name of the reader whose position this is.

position long

The position to resume after.

cancellationToken CancellationToken

Propagated to the store.

Returns

Task

A task that completes when the position is stored.