Skip to main content

MAX_DEFERRED_DELIVERIES

Constant MAX_DEFERRED_DELIVERIES 

Source
pub(super) const MAX_DEFERRED_DELIVERIES: usize = 64;
Expand description

Bound on PersistentInner::deferred_deliveries. Past this, enqueueing returns an error instead of a false success, so a caller is never told a message was delivered and then has it silently dropped (SPEC_NO_MIDTURN_DELIVERY_2026_09_23.md §4.5). Senders already handle transient delivery failure — the reactive handler, muxbus and the bridges all have to cope with an unreachable target instance — so surfacing a full queue as one more retryable failure needs no new machinery on their side.

64 is chosen to be far above any plausible legitimate backlog for one startup or restart while still bounding memory: these are whole messages, and the queue is per-block.