Skip to main content

OutboxConfig

Struct OutboxConfig 

Source
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: bool

Whether 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: OutboxTransport

Wire 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

Source§

fn clone(&self) -> OutboxConfig

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for OutboxConfig

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for OutboxConfig

Source§

fn default() -> OutboxConfig

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for OutboxConfig

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> FromRef<T> for T
where T: Clone,

Source§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoRequest<T> for T

Source§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
Source§

impl<L> LayerExt<L> for L

Source§

fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>
where L: Layer<S>,

Applies the layer to a service and wraps it in Layered.
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more