pub struct ActorEnvelope {
pub to: ActorId,
pub from: Option<ActorId>,
pub origin: Option<NodeId>,
pub req_id: u64,
pub payload: Vec<u8>,
pub reply_expected: bool,
}Expand description
An actor message crossing a node boundary via /actor/deliver (cross-node-actors).
The sender has already resolved the logical target (group + RR/keyed
selection) to a concrete instance to via the cluster directory (E7), so
the receiving node delivers straight to that instance.
Fields§
§to: ActorIdThe concrete destination instance.
from: Option<ActorId>The sending instance, when the message originates from an actor (for
replies / tracing); None for messages sent from outside the fabric.
origin: Option<NodeId>The node that originated this envelope. Combined with req_id
it forms a cluster-unique key the receiver uses to deduplicate an
at-least-once resend, so a side-effecting ask handler runs at most once
per logical request. None disables dedup (legacy / intra-fabric sends).
req_id: u64Per-sender correlation id, used to match a reply to its request and,
with origin, to deduplicate a resend.
payload: Vec<u8>Application-encoded (postcard) message body.
reply_expected: boolWhether the sender awaits a reply (ask) versus fire-and-forget
(cast). When true the receiver decodes via
UserActor::decode_ask and returns the reply in DeliverAck::reply.
Trait Implementations§
Source§impl Clone for ActorEnvelope
impl Clone for ActorEnvelope
Source§fn clone(&self) -> ActorEnvelope
fn clone(&self) -> ActorEnvelope
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more