Hi Take a look at the transactional client eip http://camel.apache.org/transactional-client.html
On Mon, Apr 8, 2013 at 5:03 PM, leroykendall <leroykend...@yahoo.com> wrote: > Hi, > > The standard JMS transaction looks like: > > session = connection.createSession( true, -1 ); > queue = session.createQueue( "queue.name" ); > consumer = session.createConsumer( queue ); > > // Messages processing loop > try { > message = consumer.receive(); // Receive message from queue > ... > messageFlow( message ); > anotherMessageFlow( message ); > ... > session.commit(); // Message acknowledge > } catch (Exception ex) { > session.rollback(); // Put message back to queue for > redelivery > } > > Question: can we do similar behavior in Camel route? > So it would look like: > > <route> > <from uri="jms:queue:queue.name"/> <|-- Receive message from > queue, but don't do acknowledge yet. --> > ... > <bean ref="messageFlow"/> > <bean ref="anotherMessageFlow"/> <|-- If exception is thrown > here then do rollback of message back to JMS queue for redelivery. --> > </route> <|-- End of route. > Do JMS session commit and message acknowledge. --> > > So can Camel 2.10.0 do this? > > Thanks. > --Victor > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/JMS-transaction-behavior-inside-of-route-tp5730513.html > Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen ----------------- Red Hat, Inc. FuseSource is now part of Red Hat Email: cib...@redhat.com Web: http://fusesource.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen