Defines the identity of the given component (e.g.
Defines the identity of the given component (e.g. /path/to/MessageForwarder)
Defines the "type" of component in a message (e.g.
Defines the "type" of component in a message (e.g. MessageForwarder)
This implementation is ported from Derek Wyatt's blog post Parts of this blog post are adapted here for documentation.
This implementation is ported from Derek Wyatt's blog post Parts of this blog post are adapted here for documentation.
EnvelopeSending is an implicit value type class that extends the functionality of the ActorRef to provide the hook that wrap messages inside a rich envelope containg meta data about the message.
With this implicit class in scope, send(..)
a message to an ActorRef will result in wrapping the message in an Envelope.
send
or sendForward
must be used rather than the regular ActorRef's tell
, forward
, and !
methods, which will
remain unwrapped with an envelope. It is easy to "drop" the envelope as a result, so as long as the envelope is important
care should be taken to use the enveloping methods.
The version of the envelope protocol
Defines the sequence number of this message within the workId
Defines the type of message being sent (e.g.
Defines the type of message being sent (e.g. SendEmail)
Defines the work identifier that this message is part of
Defines the envelope schema version number.
Defines the envelope schema version number. We shouldn't have to supply this, generally, just pull it in from the implicit scope
The enveloping package creates an envelope that carries a great deal more information than just the sender of the message. The envelope contains the following:
Importantly, all of this information to be supplied without burdening the code that sends the message. However, instead of the regular Akka
tell
and!
operations, programmers must use thesend
operation to wrap the message in a envelope.someActor send SomeMessage( "Hello there, Mr. Actor" )