MessageSpec

MessageSpec

The specification for a message being produced or consumed.

Properties:
Name Type Attributes Default Description
destinationName string

The name of the exchange or queue the message is being produced to or consumed from.

destinationType MessageShim.DESTINATION_TYPES <optional>
null

The type of the destination. Defaults to shim.EXCHANGE.

headers Object <optional>
null

A reference to the message headers. On produce, more headers will be added to this object which should be sent along with the message. On consume, cross-application headers will be read from this object.

routingKey string <optional>
null

The routing key for the message. If provided on consume, the routing key will be added to the transaction attributes as message.routingKey.

queue string <optional>
null

The name of the queue the message was consumed from. If provided on consume, the queue name will be added to the transaction attributes as message.queueName.

parameters.correlation_id string <optional>

In AMQP, this should be the correlation Id of the message, if it has one.

parameters.reply_to string <optional>

In AMQP, this should be the name of the queue to reply to, if the message has one.

messageHandler MessageHandlerFunction <optional>

An optional function to extract message properties from a consumed message. This method is only used in the consume case to pull data from the retrieved message.

Source:
See:

Extends