Skip to main content

results_need_redelivery

Function results_need_redelivery 

pub fn results_need_redelivery(results: &[DispatchResult]) -> bool
Expand description

True when at least one matched SOP is backpressured and no SOP has already started from this delivery. A durable transport (e.g. AMQP with durable_ack) can safely nack/requeue only when redelivery cannot replay a started SOP’s side effects.

For an AMQP multi-match the dispatch path reserves the whole batch before starting any SOP, so a backpressured batch is Deferred-all (redeliver) and a startable batch is Started-all — it does NOT normally produce a mixed Started+Deferred set. If a mixed set ever arises (a start reclassified after activation), this returns false: the started sibling must not be replayed by a requeue. Cleanly requeueing such a partial delivery would need per-message-id idempotency so the started sibling is not double-run, which is tracked separately and out of scope here.