Reputation: 6620
I have two camel routes that are connected via a direct: link, not linked via JMS-Queue in this case.
Can I have a transaction between these two routes?
e.g.
<route id="fileRoute">
..
<to uri="direct:start">
</route>
<route id="directStartRoute">
<from uri="direct:start">
<to uri="http://myhost/mypath">
</route>
Upvotes: 0
Views: 678
Reputation: 55525
Yes if the first route starts with a transaction and you use direct between routes then the transaction still apply. The transaction manager requires the work that happens in the transaction happens on the same thread and therefore needs to be synchronous routing, which is what direct do.
Upvotes: 2