从两个 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 的消息。
是真是假?
在同一个频道上有多个制作人没有问题;线程不会 "interfere" 彼此。
这与 message-driven 适配器(您拥有)中的并发性完全相同。
我只是想问一下,从你的角度来看,下面的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 的消息。
是真是假?
在同一个频道上有多个制作人没有问题;线程不会 "interfere" 彼此。
这与 message-driven 适配器(您拥有)中的并发性完全相同。