Camel中路由的异步处理

时间:2013-12-31 20:30:59

标签: apache-camel

ROUTE1:

1. Send Message M1 to MQ Q1. // This message goes to a program that consumes from Q1 and once some processing is done, write message M2 to Q2.<br/>

2. Upon receiving Message M2 on Q2, //Q2 receives several messages (M2,N2,P2, etc.). ONLY when M2 is received, the Route1 should continue.<br/>

3. Send message M3 to Q3. // The step should be executed only after step 2 is complete<br/>

步骤2意味着需要检查Q2上的消息,并且只有当它结果是M2时,Route1才能恢复。我们可以做什么来等待消息时暂停路由并在消息到达后恢复它? 我们可以举起一个事件,以便可以恢复等待M2的任何路线吗?我们确切地知道,在所有并行执行的路线中,只有一个可以等待M2。我们需要做些什么才能恢复路线?

谢谢, 佳日

1 个答案:

答案 0 :(得分:2)

有几个用于在运行时控制路径的选项

另请参阅此页面了解to stop a route from another route

的方式