new Message()
Represents a message that is received from the event bus in a handler.
- Source:
Methods
-
address() → {string}
-
The address the message was sent to
- Source:
Returns:
- Type
- string
-
body() → {Object}
-
The body of the message. Can be null.
- Source:
Returns:
the body, or null.- Type
- Object
-
fail(failureCode, message)
-
Signal to the sender that processing of this message failed.
If the message was sent specifying a result handler the handler will be called with a failure corresponding to the failure code and message specified here.
Parameters:
Name Type Description failureCode
number A failure code to pass back to the sender message
string A message to pass back to the sender - Source:
-
headers() → {MultiMap}
-
Multi-map of message headers. Can be empty
- Source:
Returns:
the headers- Type
- MultiMap
-
reply(message, options, replyHandler)
-
The same as
reply(R message, DeliveryOptions)
but you can specify handler for the reply - i.e. to receive the reply to the reply.Parameters:
Name Type Description message
Object the reply message options
Object the delivery options replyHandler
function the reply handler for the reply. - Source:
-
replyAddress() → {string}
-
The reply address. Can be null.
- Source:
Returns:
the reply address, or null, if message was sent without a reply handler.- Type
- string