繁体   English   中英

从两个JMS Inboundchannel适配器提供一个发布订阅通道?

[英]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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM