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

回答

0

閱讀the recipient list文檔瞭解更多詳情。默認情況下,它同步處理消息。您可以使用收件人列表的並行處理功能同時運行此功能。你也可以定義你自己的線程池。

請閱讀它所在的文檔。