Skip to main content

Module system_router

Module system_router 

Source
Expand description

Transport routing for incoming system messages to native actor mailboxes. Transport routing for incoming system messages.

When a WireEnvelope arrives on a node, the transport layer must decide whether it targets a user actor or a system actor. System messages carry well-known message_type values (defined in system_actors) and must be routed to the corresponding system actor mailbox.

The SystemMessageRouter trait is implemented by each adapter runtime to dispatch incoming system envelopes to native system actors.

§Example

let outcome = runtime.route_system_envelope(envelope).await?;
match outcome {
    RoutingOutcome::SpawnCompleted { actor_id } => { /* ... */ }
    RoutingOutcome::Acknowledged => { /* tell-style, no reply */ }
    _ => {}
}

Structs§

RoutingError
Error from system message routing.

Enums§

RoutingOutcome
Result of successfully routing a system message.

Traits§

SystemMessageRouter
Routes incoming WireEnvelope system messages to the correct native system actor mailbox.

Functions§

validate_system_message_type
Validates that an envelope carries a known system message type and returns an error if not. Useful for router implementations.