【问题标题】:active-mq artemis springboot clustered topic load balancing (round robin) issueactivemq artemis spring boot 集群主题负载均衡(循环)问题
【发布时间】:2018-06-21 19:08:39
【问题描述】:

在花费大量时间配置和尝试大量解决方案以使 Artemis 在 集群 模式下工作之后,就像 本地 模式一样>发布-订阅(主题)。 因此,我在不同的 节点 上准备了 3 个 consumers 和一个仅在一个节点上发布消息的 producer。 我希望这 3 个消费者收到他们自己的消息副本,如here 中所述!

问题是集群(Core Bridge)仍然在 3 个节点之间轮询消息。


我的项目 Github 回购

spring-boot-artemis-clustered-topic


代理集群配置

<!-- Using STRICT is like setting the legacy forward-when-no-consumers 
parameter to true--> 
<!-- Using ON_DEMAND is like setting the legacy forward-when-no-consumers 
parameter to false.-->
<cluster-connections>
     <cluster-connection name="my-cluster">
     <address>jms</address>
        <connector-ref>netty-connector</connector-ref>
        <retry-interval>500</retry-interval>
        <use-duplicate-detection>true</use-duplicate-detection>
        <message-load-balancing>ON_DEMAND</message-load-balancing>
        <max-hops>1</max-hops>
        <discovery-group-ref discovery-group-name="my-discovery-group"/>
     </cluster-connection>

</cluster-connections>

消费者行为 artemis-b1-b2-b3

【问题讨论】:

    标签: publish-subscribe spring-jms activemq-artemis


    【解决方案1】:

    在您的ConnectionFactoryClusteredConfig.pubSubFactory() 方法中,尝试在configurer.configure(factory, connectionFactory) 之后移动factory.setPubSubDomain(true),如下所述:https://stackoverflow.com/a/44416121/832268

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-02-28
      • 1970-01-01
      • 1970-01-01
      • 2020-06-09
      • 2016-01-03
      • 2022-01-18
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多