Message
Camel supports the Message from the EIP patterns using the Message interface.
The org.apache.camel.Message
is the data record that represents the message part of the Exchange.
The message contains the following information:
-
body
: the message body (i.e., payload) -
headers
: headers with additional information -
messageId
: Unique id of the message. By default, the message uses the same id asExchange.getExchangeId
as messages are associated with theExchange
and using different IDs offers little value. Another reason is to optimize for performance to avoid generating new IDs. A few Camel components do provide their own message IDs such as the JMS components. -
timestamp
: the timestamp the message originates from. Some systems like JMS, Kafka, AWS have a timestamp on the event/message that Camel receives. This method returns the timestamp if a timestamp exists.