如何在 Spring 上的 Apache Camel 中 运行 两条路线并行启动?
How to run two routes parallel at start in Apache Camel on Spring?
这里,当我将 Apache ServiceMix 作为守护进程启动时,我将两条路由配置为 运行。但是当我启动 servicemix 时,我注意到这些路由中的每一条都是按顺序执行的。我只想知道如何在 servicemix 启动的同时 运行 它们。
<camelContext xmlns="http://camel.apache.org/schema/spring">
<route>
<from uri="timer://myTimer?fixedRate=true&period=8000" />
<to uri="bean://passengerUpdateDaemon?method=process"/>
</route>
<route>
<from uri="timer://myTimer?fixedRate=true&period=8000" />
<to uri="bean://baggageUpdateDaemon?method=process"/>
</route>
</camelContext>
请告诉我如何将此 camelcode 写入 运行 并行。
使用定时器名称的唯一名称,例如 myTimer 和 myTimer2
这里,当我将 Apache ServiceMix 作为守护进程启动时,我将两条路由配置为 运行。但是当我启动 servicemix 时,我注意到这些路由中的每一条都是按顺序执行的。我只想知道如何在 servicemix 启动的同时 运行 它们。
<camelContext xmlns="http://camel.apache.org/schema/spring">
<route>
<from uri="timer://myTimer?fixedRate=true&period=8000" />
<to uri="bean://passengerUpdateDaemon?method=process"/>
</route>
<route>
<from uri="timer://myTimer?fixedRate=true&period=8000" />
<to uri="bean://baggageUpdateDaemon?method=process"/>
</route>
</camelContext>
请告诉我如何将此 camelcode 写入 运行 并行。
使用定时器名称的唯一名称,例如 myTimer 和 myTimer2