Spring-boot应用程序与Apache Artemis集群连接

时间:2017-12-13 17:37:53

标签: spring-boot spring-jms activemq-artemis

Spring-Boot可以在类路径上获得Artemis时自动配置连接工厂。但是我们如何将spring-boot应用程序配置到本机Artemis集群(多个节点)

1 个答案:

答案 0 :(得分:1)

如果在broker.xml中使用消息负载平衡的TRICT值。然后,您需要创建与您正在使用的节点一样多的连接。在Spring中,您可以使用MessageListenerContainer来监听使用者。 Here是连接到群集的示例应用程序(带有2个节点)