Arcana::Envelope
A message passed between agents via the Bus.
id and re are mail headers in the dot-ai sense, carried with the
message and never set by the bus. id is the message's own id, the
same on the sender's and the recipient's copy: hex, 8 digits or more
(dot-ai computes it from the sender, the sent copy's name and the
message). It isn't the correlation id, which a request and its reply
share. re says what a message answers: a message's id, or a topic's
post as #topic:<seq>. Either is dropped (nil) when it isn't in that
form, so neither can carry anything else into a mail file's headers.
Constants
MESSAGE_ID = /\A[0-9a-fA-F]{8,64}\z/
REPLY_TO = /\A(?:[0-9a-fA-F]{8,64}|#[^\s:]+:\d+)\z/
Constructors
new(from : String, to : String = "", subject : String = "", payload : JSON::Any = JSON::Any.new(nil), correlation_id : String = Random::Secure.hex(8), reply_to : String | Nil = nil, ordering : Ordering = Ordering::Auto, timestamp : Time = Time.utc, id : String | Nil = nil, re : String | Nil = nil)
SourceInstance methods
correlation_id
Sourcefrom
Sourceid
Sourceordering
Sourceordering=(ordering : Ordering)
Sourcepayload
Sourcere
SourceCreate a reply to this envelope.
reply_to
Sourcesubject
Sourcetimestamp
Sourceto
Source