class AsyncMessage
package feathers.messaging.messages
extends AbstractMessage
implements ISmallMessage
extended by AcknowledgeMessage, CommandMessage
AsyncMessage is the base class for all asynchronous messages.
Static variables
staticfinalread onlySUBTOPIC_HEADER:String = "DSSubtopic"
Messages sent by a MessageAgent with a defined subtopic
property indicate their target subtopic in this header.
Constructor
new(?body:Any, ?headers:Any)
Constructs an instance of an AsyncMessage with an empty body and header.
In addition to this default behavior, the body and the headers for the
message may also be passed to the constructor as a convenience.
An example of this invocation approach for the body is:
var msg:AsyncMessage = new AsyncMessage("Body text");
An example that provides both the body and headers is:
var msg:AsyncMessage = new AsyncMessage("Body text", {"customerHeader":"customValue"});
Parameters:
body | The optional body to assign to the message. |
---|---|
headers | The optional headers to assign to the message. |
Variables
correlationId:String
Provides access to the correlation id of the message.
Used for acknowledgement and for segmentation of messages.
The correlationId
contains the messageId
of the
previous message that this message refers to.
See also:
feathers.messaging.messages.AbstractMessage#messageId