0
我是Apache骆驼的新手。我有很常见的用例,我正在努力配置骆驼路线。用例是执行上下文Apache骆驼嵌套路由
- 使用执行上下文更新数据库。
- 然后,使用上的执行上下文事件,创建一个字节的消息,并发送在MQ。
- 然后,在下一步骤中再次使用的执行上下文,并执行事件处理。
- 使用执行上下文更新数据库。
所以基本上它的种类嵌套路线。在下面的配置中,我需要访问executionController在updateSchedulerState,sendNotification,processEvent和updateSchedulerState中创建的executionContext,即分别注释为1,2,3和4的步骤。
from("direct:processMessage")
.routeId("MessageExecutionRoute")
.beanRef("executionController", "getEvent", true)
.beanRef("executionController", "updateSchedulerState", true) (1)
.beanRef("executionController", "sendNotification", true) (2)
.beanRef("messageTransformer", "transform", true)
.to("wmq:NOTIFICATION")
.beanRef("executionController", "processEvent", true) (3)
.beanRef("eventProcessor", "process", true)
.beanRef("messageTransformer", "transform", true)
.to("wmq:EVENT")
.beanRef("executionController", "updateSchedulerState", true); (4)
请让我知道如何配置上述用例的路由。
感谢, Vaibhav的