0
from("direct:A")
.process(//processing here)
.recipientList(//expression that return two recipients [direct:B, direct:C])
from("direct:B")
.process(//processing here)...
from("direct:C")
.process(//processing here)...
.from("direct:A")
行为就像一个Java方法,即调用它会继续process()
线程。骆驼如何recipientList转发消息
那么在上述情况下会发生什么?
我们说线程t1
电话from("direct:A")
然后
t1
将继续process()
,然后t1
会从这里开始,病房会t1
呼叫from("direct:B")
进入recipientList()
现在,然后调用from("direct:C")
同步
或
direct:b
和direct:c
将在两个新线程中被异步调用。