On Mon, Nov 5, 2012 at 7:36 PM, David J. M. Karlsen <davidkarl...@gmail.com> wrote: > Hi. > > I have a route where the from endpoint is jms based. > The end of the route will be a jms endpoint as well. > I also have errorhandling in an onException clause which will put the > message on a third jms queue. > > So in short - jms in - jms out. > > I wanna protect this messagehandling with a jms transaction handler (all > resources use the same connection factory so that messages cannot be lost. > > I can either configure the route to use <transacted /> as described in: > http://camel.apache.org/transactional-client.html. > > But I can also just configure the jms endpoints to use transacted=true as > described in: > http://camel.apache.org/jms.html > > is there any difference at all by configuring them either way? >
Scott and you are both right. Scott highlight the fact that <transacted> ensures the Camel processing runs inside a TX context. Where as without that the TX context is only for the broker (and only within the same unit of work from the same JMS session). So if you only use JMS (from the same broker), then in essence you may not need to have <transacted> in the route. And only if your route starts from JMS. If you do from jetty:http to jms to file And want the JMS to be transacted, then you would need to use <transacted> to ensure the route is acting in the same TX context. eg to only commit sending the message to the JMS endpoint, if the route completed successful. And therefore you would need to enable TX on the route: from jetty:http transacted to jms to file Does my rambling make any sense? > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/transactional-client-vs-transacted-true-on-a-jms-route-tp5722167.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