[英]Feeding one publish subscribe channel from two JMS Inboundchannel adapters?
從您的角度來看,我只是想問一下以下SI配置是否可以...。
接下來讓我們發布一些訂閱者的訂閱頻道...
<int:publish-subscribe-channel id="channelName" ignore-failures="false"/>
並從兩個JMS消息驅動的適配器提供它:
<jms:message-driven-channel-adapter channel="channelName"
destination="JMSQueue1"
connection-factory="JMSQueue1CF1"
concurrent-consumers="1"
max-concurrent-consumers="10"
error-channel="errorChannel"
acknowledge="transacted"
task-executor="mySimpleTaskExecutor1"/>
<jms:message-driven-channel-adapter channel="channelName"
destination="JMSQueue2"
connection-factory="JMSQueue2CF2"
concurrent-consumers="1"
max-concurrent-consumers="10"
error-channel="errorChannel"
acknowledge="transacted"
task-executor="mySimpleTaskExecutor2"/>
如果這兩個JMS入站通道適配器都將具有相同的輸出通道(“ channelName”),它們是否會以某種方式干擾其處理?
我的猜測是,來自兩個隊列的每個消息都將在不同的線程中使用,因此來自JMSQueue1的消息處理將不會等待來自JMSQueue2的消息。
對還是錯?
在同一頻道上擁有多個制作人沒有任何問題; 線程不會彼此“干擾”。
它與消息驅動適配器(您擁有的)中的並發性完全相同。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.