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
將在兩個新線程中被異步調用。