Hello, Looking at the Camel rabbitmq component source you can see here: https://github.com/apache/camel/blob/master/components/camel-rabbitmq/src/main/java/org/apache/camel/component/rabbitmq/RabbitMQMessageConverter.java#L161 and a bit below that only primitive types are supported. Lists or Objects will be returned as null so I guess that is why the header is not allowed to pass through.
Could be a feature request? Best Souciance On Wed, Apr 5, 2017 at 8:44 PM, Caleb Skidmore [via Camel] < [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 > > > ------------------------------ > If you reply to this email, your message will be added to the discussion > below: > http://camel.465427.n5.nabble.com/Camel-Not-Sending-Objects- > in-Headers-to-RabbitMQ-tp5797027.html > To start a new topic under Camel - Users, email > [email protected] > To unsubscribe from Camel - Users, click here > <http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=465428&code=c291Y2lhbmNlLmVxZGFtLnJhc2h0aUBnbWFpbC5jb218NDY1NDI4fDE1MzI5MTE2NTY=> > . > NAML > <http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml> > -- View this message in context: http://camel.465427.n5.nabble.com/Camel-Not-Sending-Objects-in-Headers-to-RabbitMQ-tp5797027p5797028.html Sent from the Camel - Users mailing list archive at Nabble.com.
