SnapshotMaintainer
Checkpointed asynchronous projection that derives snapshots from committed events.
Duplicate delivery is ignored by physical aggregate version. A gap is rebuilt from the latest compatible snapshot plus authoritative event history. A failed write fails the batch, keeping the runner checkpoint behind so the selected snapshot version is retried.
Constructors
Functions
Transitions to caught-up after the source is live and queued batches have been handled and checkpointed. This is consumer readiness, not an upstream effective-time watermark.
Handles one ordered event batch. This must be replay-safe because duplicates are possible.
Leaves previously caught-up state before handling a new batch, or when the source is no longer live or the session ends. Repeated batches/status changes while behind do not repeat this callback.
Starts an owned processing session before source delivery. checkpoint is its resume cut; initialization must complete before returning. Launch background work in scope, which is cancelled and joined before onStopped and ownership release. Each session starts uncaught-up.