pub struct OutboxConfig {
pub enabled: bool,
pub poll_interval_ms: Option<u64>,
pub batch_size: Option<u32>,
pub max_attempts: Option<u32>,
pub backoff_base_ms: Option<u64>,
pub backoff_multiplier: Option<u32>,
pub backoff_max_ms: Option<u64>,
pub reconcile_interval_ms: Option<u64>,
pub reconcile_stale_after_ms: Option<u64>,
pub transport: OutboxTransport,
pub liminal_listen_address: Option<String>,
}Expand description
Durable-outbox fan-out dispatcher settings from [outbox].
The outbox dispatcher is dark by default, gated on enabled: with it false
(the section absent or enabled = false) the non-replayed background task
that claims pending outbox rows and dispatches them to connected workers is
never spawned, so default server behaviour is unchanged and the live
workflow dispatch path is the only dispatch path. Setting enabled = true
commissions the dispatcher; its operational knobs below — poll interval,
claim batch size, retry budget, and the backoff curve — are pure tuning, so
each resolves to a sane default when omitted rather than forcing the
operator to hand-author tuning values just to turn the feature on. An
explicitly set value (including a misconfigured 0) is still validated.
Scope: this Phase-2 dispatcher dispatches claimed rows and marks each row’s terminal outbox state (done / retry / failed). Routing the worker completion back into workflow history through the Recorder is Phase 3 and is not wired here; with the flag off there is no behavioural difference at all.
Fields§
§enabled: boolWhether the outbox dispatcher background task is spawned. Defaults to false, leaving the dispatcher dark and server behaviour unchanged.
poll_interval_ms: Option<u64>Interval between successive claim sweeps, in milliseconds. Defaults to
DEFAULT_OUTBOX_POLL_INTERVAL_MS when omitted and enabled = true;
override to size the poll cadence for fan-out volume and latency budget.
batch_size: Option<u32>Maximum number of pending rows claimed per sweep. Defaults to
DEFAULT_OUTBOX_BATCH_SIZE when omitted and enabled = true.
max_attempts: Option<u32>Dispatch attempts before a row is dead-lettered to failed. Defaults to
DEFAULT_OUTBOX_MAX_ATTEMPTS when omitted and enabled = true. Must
be at least one.
backoff_base_ms: Option<u64>Base retry backoff applied to the first retry, in milliseconds. Defaults
to DEFAULT_OUTBOX_BACKOFF_BASE_MS when omitted and enabled = true.
Successive retries multiply this by backoff_multiplier raised to the
prior-attempt count, capped at backoff_max_ms.
backoff_multiplier: Option<u32>Geometric growth factor applied to the backoff per prior attempt.
Defaults to DEFAULT_OUTBOX_BACKOFF_MULTIPLIER when omitted and
enabled = true. Must be at least one so backoff never shrinks.
backoff_max_ms: Option<u64>Upper bound on a single retry’s backoff, in milliseconds. Defaults to
DEFAULT_OUTBOX_BACKOFF_MAX_MS when omitted and enabled = true. Must
be at least backoff_base_ms.
reconcile_interval_ms: Option<u64>Interval between live stale-claim reconciliation sweeps, in milliseconds. When both reconciliation knobs are absent the live sweep remains dark; setting either knob opts into reconciliation and requires both values to be positive.
reconcile_stale_after_ms: Option<u64>Age after which a durable claimed outbox row is considered stranded, in milliseconds. The
reconciler re-arms only rows with claimed_at older than this threshold, preserving their
attempt count.
transport: OutboxTransportWire transport the dispatcher uses to place a claimed row with a worker.
Defaults to OutboxTransport::Liminal whenever the liminal-transport
Cargo feature is compiled (the default ablative-stack build), so an
outbox-enabled server uses the liminal cross-node transport out of the box;
a slim build without that feature defaults to OutboxTransport::Grpc.
Selecting liminal in a build without the feature is a configuration error
surfaced at spawn. The transport only matters when outbox.enabled = true.
liminal_listen_address: Option<String>Address (host:port) the aion-server LISTENS on for inbound liminal
worker connections, used only when transport = liminal. REQUIRED in that
mode; ignored otherwise.
The aion-server HOSTS the liminal listener: a remote LiminalActivityWorker
connects IN to this address and self-registers in-band, so the server’s
ConnectionSupervisor
owns the worker’s connection and can push a dispatch out on it
(push_to_connection). This replaces the superseded 13-0 spike’s
client-connect address: the dispatcher no longer connects out to publish
to a channel — it pushes to a connected worker the server already owns.
The dispatch channel is not configured here: it is derived per-row from
each row’s durable (namespace, task_queue) via dispatch_channel_name
(NSTQ-5), so one listener fans different worker pools out by selection.
Trait Implementations§
Source§impl Clone for OutboxConfig
impl Clone for OutboxConfig
Source§fn clone(&self) -> OutboxConfig
fn clone(&self) -> OutboxConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for OutboxConfig
impl Debug for OutboxConfig
Source§impl Default for OutboxConfig
impl Default for OutboxConfig
Source§fn default() -> OutboxConfig
fn default() -> OutboxConfig
Source§impl<'de> Deserialize<'de> for OutboxConfigwhere
OutboxConfig: Default,
impl<'de> Deserialize<'de> for OutboxConfigwhere
OutboxConfig: Default,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for OutboxConfig
impl RefUnwindSafe for OutboxConfig
impl Send for OutboxConfig
impl Sync for OutboxConfig
impl Unpin for OutboxConfig
impl UnsafeUnpin for OutboxConfig
impl UnwindSafe for OutboxConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request