# Class: Message

## vertx-js/message~ Message

#### new Message()

  Represents a message that is received from the event bus in a handler.

  Source:
    - message.js, line 32

### Methods

#### address() → {string}

  The address the message was sent to
  Source:
    - message.js, line 44

  ##### Returns:

  Type
    string

#### body() → {Object}

  The body of the message. Can be null.
  Source:
    - message.js, line 72

  ##### 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:
    - message.js, line 140

#### headers() → {MultiMap}

  Multi-map of message headers. Can be empty
  Source:
    - message.js, line 58

  ##### 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:
    - message.js, line 105

#### replyAddress() → {string}

  The reply address. Can be null.
  Source:
    - message.js, line 89

  ##### Returns:

  the reply address, or null, if message was sent without a reply handler.
  Type
    string