Expand description
Shared order book recovery state, sequence decisions, and snapshot coordination.
recoveryowns recovery episodes, retry budgets, cancellation, and terminal failure state.snapshotcoordinates subscription write confirmation with snapshot acceptance and deadlines.BookSequenceOutcomeandBookSyncSignalKinddescribe validation decisions and monitoring signals without carrying venue-specific sequence fields or channel types.
§Recovery Lifecycle
The adapter validates incoming book frames and claims recovery through
BookRecoveryState. The recovery runner requests replacement
subscriptions through an adapter-supplied operation. A confirmed write opens the snapshot gate;
only an accepted fresh snapshot completes recovery. The adapter reports terminal failure through
the same recovery state, preventing obsolete work from failing a newer subscription.
§Adapters
Adapters retain sequence rules, cached levels, socket routing, wire commands, acknowledgement correlation, and error classification. They keep state transitions under their existing lock or owning task and retain an active recovery across reconnects so its retry budget is not reset.
A monitoring signal does not itself start recovery; the adapter decides how to respond.
Modules§
- recovery
- Recovery ownership and bounded replacement attempts for one book.
- snapshot
- Subscription write gates and pending snapshot lifetimes.
Enums§
- Book
Sequence Outcome - Decision from an adapter’s book sequence validation.
- Book
Sync Signal Kind - Condition reported while monitoring book synchronization.
Constants§
- DEFAULT_
BOOK_ SNAPSHOT_ TIMEOUT_ SECS - Default wait for an initial, post-reconnect, or recovery order book snapshot, in seconds.