The exchange that is sent over the JMS wire must conform to the JMS Message spec.
For the exchange.in.header
the following rules apply for the header
keys :
Keys starting with
JMS
orJMSX
are reserved.exchange.in.headers
keys must be literals and all be valid Java identifiers (do not use dots in the key name).Camel replaces dots and hyphens and the reverse when when consuming JMS messages:
.
is replaced by_DOT_
and the reverse replacement when Camel consumes the message.-
is replaced by_HYPHEN_
and the reverse replacement when Camel consumes the message.See also the option
jmsKeyFormatStrategy
, which allows you to use your own custom strategy for formatting keys.
For the exchange.in.header
, the following rules apply for the header
values :
The values must be primitives or their counter objects (such as
Integer
,Long
,Character
). The types,String
,CharSequence
,Date
,BigDecimal
andBigInteger
are all converted to theirtoString()
representation. All other types are dropped.
Camel will log with category org.apache.camel.component.jms.JmsBinding
at
DEBUG level if it drops a given header value. For
example:
2008-07-09 06:43:04,046 [main ] DEBUG JmsBinding - Ignoring non primitive header: order of class: org.apache.camel.component .jms.issues.DummyOrder with value: DummyOrder{orderId=333, itemId=4444, quantity=2}