,如果我理解你的問題的權利,你有:
- 127.0.0.1:8056作爲SMS客戶端
- 本地主機:2775爲短信發送者
它看起來像此
from:client1 ----> to:sender1
可以說你想connecto更多短信客戶端到您的短信發件人。
from:client1 -----> to:sender1
from:client2 ----/
from:client3 ---/
所有你需要做是爲了增加更多的從節點。
我想你是用springish xml文件來配置駱駝。這意味着你用聲明的方式來做,而駱駝的功能和你在xml文件中聲明的一樣多。沒有for循環或什麼的。所以,文學上你需要在你的xml中添加更多的from uri="smpp://[email protected]:8056?password=password&systemType=consumer"/>
行。通過其他方式,您可以使用camel java API動態配置/添加節點。所以,你可以配置或添加你的節點從數據庫或任何。
那麼,但你必須添加儘可能多的to uri="smpp://[email protected]:2775?password=password&&systemType=producer"/>
節點,這不完全是我們的意思。爲了解決這個問題,我們添加一個抽象節點。它看起來像:
from:client1 -----> direct:sender ----> to:sender1
from:client2 ----/
from:client3 ---/
所以,你的代碼將是:
from uri="smpp://[email protected]:8056?password=password&systemType=consumer"/>
to uri="direct://sender"
from uri="smpp://[email protected]"/>
to uri="direct://sender"
from uri="smpp://[email protected]"/>
to uri="direct://sender"
from uri="direct://sender"
to uri="smpp://[email protected]:2775?password=password&&systemType=producer"/>
你可以考慮使用的seda
代替direct
所以你得到相當容易地排隊。
你有這些客戶的列表。我的意思是要問,如果你在接受請求之前有這樣的清單,這可能是可以實現的。 – Ashish
我沒有客戶名單 – Joe2013