Table of Contents

Interface ITransactionalProjectionEventStore

Namespace
Excalibur.EventSourcing
Assembly
Excalibur.EventSourcing.Abstractions.dll

Optional store-owned atomic append with aggregate-local projections.

public interface ITransactionalProjectionEventStore

Remarks

A confirmed success includes both the append and all callback writes. A pre-commit callback fault rolls back the transaction. An uncertain commit must not be reported as a proven rollback. An old append's event identities alone do not establish that its projection workset ran.

Methods

AppendWithProjectionsAsync(string, string, IReadOnlyList<IDomainEvent>, long, Func<ProjectionTransaction, CancellationToken, ValueTask>, CancellationToken)

Appends events and projection changes in one transaction.

ValueTask<AppendResult> AppendWithProjectionsAsync(string aggregateId, string aggregateType, IReadOnlyList<IDomainEvent> events, long expectedVersion, Func<ProjectionTransaction, CancellationToken, ValueTask> apply, CancellationToken cancellationToken)

Parameters

aggregateId string

Stream identifier.

aggregateType string

Stream type.

events IReadOnlyList<IDomainEvent>

New events.

expectedVersion long

Expected last persisted version, or -1 for a new stream.

apply Func<ProjectionTransaction, CancellationToken, ValueTask>

Callback before append, using authoritative history and the supplied transaction.

cancellationToken CancellationToken

Cancellation token. Cancellation does not prove rollback after commit dispatch.

Returns

ValueTask<AppendResult>

The confirmed or uncertain append outcome.