Hi

You cannot just send any kind of java object as a header.

Search the rabbitmq documentation what kind of header types it
supports. Currently its set to primitive types and string etc just as
the JMS spec etc do.


On Wed, Apr 5, 2017 at 7:39 PM, Caleb Skidmore
<[email protected]> wrote:
> Hello,
>
> When I set a header as an object and route it to RabbitMQ, the header does 
> not arrive.  For instance:
>
> List<String> testData = new ArrayList<>();
> testData.add("test");
> testData.add("data");
> exchange.getIn().setHeader("ObjectHeader", testData);
> exchange.getIn().setHeader("StringHeader", testData.toString());
>
> When I check the headers in RabbitMQ, the StringHeader is there but the 
> ObjectHeader is missing.  Any thoughts on what is happening to the 
> ObjectHeader?
>
> Thanks,
> C
>



-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2

Reply via email to