Skip to main content

Module book

Module book 

Source
Expand description

Shared order book recovery state, sequence decisions, and snapshot coordination.

  • recovery owns recovery episodes, retry budgets, cancellation, and terminal failure state.
  • snapshot coordinates subscription write confirmation with snapshot acceptance and deadlines.
  • BookSequenceOutcome and BookSyncSignalKind describe 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§

BookSequenceOutcome
Decision from an adapter’s book sequence validation.
BookSyncSignalKind
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.