Camel : 直连next route,可以交易吗?

Camel : direct connection the next route, can it be transacted?

我有两条通过直接连接的骆驼路线:link,在这种情况下不是通过 JMS-Queue linked。

我可以在这两条路线之间进行交易吗?

例如

<route id="fileRoute">
   ..
   <to uri="direct:start">
</route>

<route id="directStartRoute">
   <from uri="direct:start">
   <to uri="http://myhost/mypath">
</route>

是的,如果第一条路线以交易开始,并且您在路线之间使用直接交易,则交易仍然适用。事务管理器要求事务中发生的工作发生在同一个线程上,因此需要同步路由,这就是direct做的。