See this FAQ http://camel.apache.org/using-getin-or-getout-methods-on-exchange.html
Just use getIn() On Sun, Apr 27, 2014 at 7:35 PM, malcolm davis <malc...@nuearth.com> wrote: > I'm not sure if the following is a bug that needs to be reported, and that > I'm missing something obvious. > > For a single route with multiple JMS queues, the first queue is properly > dequeued, but the remaining routes do not have the ActiveMQ message > dequeued. > a. Messages flow through the system to completion. > b. If the single route is decomposed into multiple camel routes, the > messages are properly dequeued. > c. The issue occurs for both SjmsComponent and JmsComponent > d. The issue occurs for both auto acknowledge and client acknowledge. > > In the following route, the file written at the end is correct, but messages > are still in queues DEMO.TRANSFORM.1 and DEMO.TRANSFORM.2 > > from("activemq:queue:DEMO.IN") > .process( new org.apache.camel.Processor() { > @Override > public void process(Exchange exchange) throws Exception { > > exchange.getOut().setBody(exchange.getIn().getBody().toString() + > "<in>step 1</in>"); > } > }) > .to("activemq:queue:DEMO.TRANSFORM.1") > .process( new org.apache.camel.Processor() { > @Override > public void process(Exchange exchange) throws Exception { > > exchange.getOut().setBody(exchange.getIn().getBody().toString() + > "<transform1>true</transform1>"); > } > }) > .to("activemq:queue:DEMO.TRANSFORM.2") > .process( new org.apache.camel.Processor() { > @Override > public void process(Exchange exchange) throws Exception { > > exchange.getOut().setBody(exchange.getIn().getBody().toString() + > "<transform2>true</transform2>"); > } > }) > .to("file://c:/temp/DEMO.FINISHED"); > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/ActiveMQ-message-not-dequeued-for-a-single-route-with-multiple-queues-tp5750631.html > Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen ----------------- Red Hat, Inc. Email: cib...@redhat.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen hawtio: http://hawt.io/ fabric8: http://fabric8.io/