EngineMessage¶
Purpose¶
A message sent to a pub/sub topic by an engine.
Type¶
Reception:
Record with fields:
-
src
: EngineIdentitySource engine identity
-
dst
: DestinationIdentityDestination identity
-
id
: u64Message ID: unique per
src
-dst
pairs
-
reply_to
: Optionid
of a previous message this message is in reply to
-
expiry
OptionExpiry time for outgoing messages. See P2PMessage & TransportMessage.
-
rprefs
: Option<RoutingPrefs>Routing preferences
-
tprefs
: Option<TransportPrefs>Transport preferences
-
protocol
: ProtocolProtocol & version used in
body
-
body
: VecSerialized message body
-
sig
: OptionSignature over the above fields by
src
Triggers:
Behaviour¶
When a local engine sends an EngineMessage destined to a pub/sub topic, the Router forwards it to all local engines subscribed to the message, including PubSub.
PubSub then encapsulates the message in an Event, and forwards it to its neighbors along the event dissemination path.
Message flow¶
sequenceDiagram
%% --8<-- [start:sequence]
Any Local Engine -) Router: EngineMessage
Router -) PubSub: EngineMessage
PubSub -) PubSub: Event
%% --8<-- [end:sequence]