【问题标题】:Feeding one publish subscribe channel from two JMS Inboundchannel adapters?从两个 JMS Inboundchannel 适配器提供一个发布订阅通道?
【发布时间】:2019-05-13 13:12:19
【问题描述】:

我只是想问一下,从你的角度来看,以下 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 的消息。

真假?

【问题讨论】:

    标签: spring spring-integration spring-jms


    【解决方案1】:

    在同一个频道上拥有多个生产者没有问题;线程不会相互“干扰”。

    这与在消息驱动的适配器(你有)中具有并发性完全相同。

    【讨论】:

      猜你喜欢
      • 2016-04-26
      • 1970-01-01
      • 2020-11-12
      • 1970-01-01
      • 1970-01-01
      • 2016-06-17
      • 1970-01-01
      • 1970-01-01
      • 2013-11-22
      相关资源
      最近更新 更多