Table of Contents

Interface IProjectionProcessor

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

Applies committed events to persisted asynchronous projections on demand.

public interface IProjectionProcessor

Remarks

The built-in processor and background worker share a fair, process-local gate for one finite page at a time. Manual calls can make progress while the worker is running. Other processes cooperate through positioned projection writes and a durable checkpoint compare-and-set, without inheriting ambient leader election. All participants sharing a subscription name must bind the same processing definition: projection types, source/destination scope and consumer revision. External handler effects remain at-least-once and must be idempotent on the event identifier.

Methods

ProcessPendingAsync(CancellationToken)

Processes through the stream head observed when this invocation begins, then returns.

Task<ProjectionProcessingResult> ProcessPendingAsync(CancellationToken cancellationToken)

Parameters

cancellationToken CancellationToken

Cancellation token.

Returns

Task<ProjectionProcessingResult>

The number of processed stream events and the reason the invocation stopped.

Remarks

A finite target prevents concurrent producers from keeping the invocation alive indefinitely. Each page starts from the shared durable checkpoint. A competing checkpoint advance is reconciled internally; CaughtUp means that the shared subscription reached the captured target, including work completed by another compatible processor. A poison event, apply decline/fault or checkpoint failure returns Halted without acknowledging the failed page. A subscription whose roster holds members this process does not host also returns Halted, because no caught-up claim can cover them. Cancellation returns Cancelled. Partially completed pages can have effects that are not included in the returned count and are redelivered. A handler that swallows cancellation cannot acknowledge that page once the caller's token is signalled.