Thanks for the response Christian, and sorry for my delay.
Christian Mueller wrote
> I do not have a solution at present, but I'm wondering what happens if you
> commit the exchange (than the message is deleted from the queue and the
> database is updated) and than your route fails?
> Also as far as I know, the default transaction timeout for SPTM is 120
> seconds. May be your 30 seconds are ok for one transaction?
If the message is
(1) deleted from the queue
(2) the database is updated
(3) and the route fails
This is perfectly fine. I can package up the exception and get that back to
the client.
It would be cool if we could demarcate the transaction differently. Instead
of:
<route>
<from uri="q:queue:queue/batch/ready" />
<transacted/>
<to uri="bean:batchListener?method=init" />
<to uri="seda:queue.process" />
</route>
<route>
<from uri="seda:queue.process" />
<to uri="bean:batchProcessor?method=process" />
</route>
one could do something like this:
<route>
<from uri="q:queue:queue/batch/ready" />
<transacted>
<to uri="bean:batchListener?method=init" />
</transacted>
<to uri="bean:batchProcessor?method=process" />
</route>
Is there another way for me to setup these routes to achieve my original use
case? I really would like to keep using camel, but this may force me to go
another route. Thanks for your help.
--
View this message in context:
http://camel.465427.n5.nabble.com/transactions-that-span-multiple-routes-tp5723735p5734578.html
Sent from the Camel - Users mailing list archive at Nabble.com.