pub struct InFlightClaim(/* private fields */);Expand description
Re-export of camel_api::InFlightClaim — the context-global
accepted-not-completed RAII claim (drainclaim). The canonical
definition and contract live in camel_api::in_flight; this alias
keeps the historical camel_component_api::consumer::InFlightClaim
path stable. claimfamily: the type moved to camel-api so
camel_api::Exchange can carry it for stash-site residency.
One accepted-not-completed unit on the context-global in-flight
counter.
Attaching a claim increments the counter; dropping it decrements the
counter exactly once (RAII), covering every release path — normal
pipeline completion, dispatch push failure, queued-envelope drop,
pipeline task abort, panic, and readiness failure — with no manual
rollback code. Fanout sites mint one sibling claim per subscriber copy
via InFlightClaim::split, so each copy counts and releases
independently (drainclaim). The type is deliberately NOT Clone:
duplicating a claim would double-release on drop; fanout copies mint
siblings via InFlightClaim::split instead.
Claim lifecycle during a pipeline run (claimfamily): the pipeline drain site holds the envelope’s claim in task scope AND splits a sibling onto the exchange, so residency inside pipeline-embedded stash sites (resequencer buffer, aggregator bucket) stays counted after the pipeline task itself completes. Out-of-band stash emissions escape with their carried claims; the in-band pipeline result has its sibling taken back before the reply, so release stays at task end for exchanges that complete inside the pipeline.
Implementations§
Source§impl InFlightClaim
impl InFlightClaim
Sourcepub fn attach(counter: &Arc<Atomic<u64>>) -> InFlightClaim
pub fn attach(counter: &Arc<Atomic<u64>>) -> InFlightClaim
Mint a claim against counter, incrementing it by one.
Sourcepub fn split(&self) -> InFlightClaim
pub fn split(&self) -> InFlightClaim
Mint a sibling claim for a fanout copy, incrementing the same counter by one. The original claim stays live.