【发布时间】: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