pub struct DispatchRequest {
pub activity_type: String,
pub workflow_id: WorkflowId,
pub ordinal: u64,
pub run_id: Option<RunId>,
pub completion_token: String,
pub idempotency_key: String,
pub input: Vec<u8>,
pub attempt: u32,
pub labels: BTreeMap<String, String>,
pub heartbeat_window_ms: u64,
}Expand description
Wire request carrying one scheduled activity to a liminal worker.
Mirrors the dispatch half of the gRPC ActivityTask: the fields the worker
needs to execute the activity and to correlate its result back to the exact
execution (workflow_id, ordinal, run_id). run_id rides end-to-end so
the existing continue-as-new run gates hold over the liminal wire (the design
doc §3.3 requirement that RunId stays on the wire).
Fields§
§activity_type: StringActivity type the worker must execute.
workflow_id: WorkflowIdWorkflow that scheduled this fan-out activity. Carried in its serde form so no fragile id parsing happens on the wire.
ordinal: u64Pinned ordinal of this activity within the workflow’s fan-out range.
run_id: Option<RunId>Run that dispatched this ordinal, when known (continue-as-new safety).
completion_token: StringOpaque execution-generation proof echoed verbatim by the worker.
idempotency_key: StringStable external-effect key for this run and action site.
input: Vec<u8>Opaque activity input bytes (JSON-tagged on the aion side), in the one
payload-bytes wire shape (aion_core::payload_bytes): a base64 string
or an array of byte integers decode; the encoder is the codec’s.
attempt: u32One-based delivery attempt, mirroring the gRPC ActivityTask.attempt.
The engine-seam bridge threads the real attempt so a retry executes with
attempt-aware handler semantics identical to the gRPC transport; the
outbox path stamps the row’s stored zero-based attempt as one-based.
Serde-defaulted to 1 so a frame from a pre-attempt server (or an old
recorded frame) still decodes as a first delivery.
labels: BTreeMap<String, String>Engine-provided routing/metadata labels, mirroring the gRPC
ActivityTask.labels. Empty (the serde default) on the outbox path,
which has no label source.
heartbeat_window_ms: u64The server’s heartbeat window in milliseconds when this dispatch is
tracked by the server’s per-task liveness tracker (the engine-seam
bridge path), or 0 when it is not (the outbox path, whose liveness
backstop is its own retry loop). A non-zero window tells the worker to
pump automatic liveness beats at a quarter-window cadence so the
server’s heartbeat sweeper never expires a healthy long-running
activity — the exact liminal mirror of the gRPC worker’s automatic
liveness pump.
Trait Implementations§
Source§impl Clone for DispatchRequest
impl Clone for DispatchRequest
Source§fn clone(&self) -> DispatchRequest
fn clone(&self) -> DispatchRequest
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 DispatchRequest
impl Debug for DispatchRequest
Source§impl<'de> Deserialize<'de> for DispatchRequest
impl<'de> Deserialize<'de> for DispatchRequest
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>,
impl Eq for DispatchRequest
Source§impl PartialEq for DispatchRequest
impl PartialEq for DispatchRequest
Source§impl SchemaValidate for DispatchRequest
impl SchemaValidate for DispatchRequest
Source§fn schema_metadata() -> SchemaMetadata
fn schema_metadata() -> SchemaMetadata
Source§impl Serialize for DispatchRequest
impl Serialize for DispatchRequest
impl StructuralPartialEq for DispatchRequest
Auto Trait Implementations§
impl Freeze for DispatchRequest
impl RefUnwindSafe for DispatchRequest
impl Send for DispatchRequest
impl Sync for DispatchRequest
impl Unpin for DispatchRequest
impl UnsafeUnpin for DispatchRequest
impl UnwindSafe for DispatchRequest
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<M> EmbeddedChannelMessage for Mwhere
M: Serialize + SchemaValidate,
impl<M> EmbeddedChannelMessage for Mwhere
M: Serialize + SchemaValidate,
Source§fn schema_metadata(&self) -> SchemaMetadata
fn schema_metadata(&self) -> SchemaMetadata
Source§impl<M> EmbeddedConversationMessage for Mwhere
M: Serialize,
impl<M> EmbeddedConversationMessage for Mwhere
M: Serialize,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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> IntoMaybeUndefined<T> for T
impl<T> IntoMaybeUndefined<T> for T
Source§fn into_maybe_undefined(self) -> MaybeUndefined<T>
fn into_maybe_undefined(self) -> MaybeUndefined<T>
Source§impl<T> IntoOption<T> for T
impl<T> IntoOption<T> for T
Source§fn into_option(self) -> Option<T>
fn into_option(self) -> Option<T>
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