ActiveMQ rebalanceClusterClient不能与Spring Boot JMS一起使用

问题描述 投票:0回答:1

我们正在将Spring JmsTemplate实现与CachingConnectionFactory一起使用。我们已使用故障转移URL配置连接:

failover:(ssl://172.16.0.11:61616,ssl://172.16.0.12:61616)?maxReconnectDelay=2000

在ActiveMQ的传输连接器上,我们启用了选项“ rebalanceClusterClients”:

        <transportConnector name="openwire" uri="ssl://0.0.0.0:61616?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600" rebalanceClusterClients="true">
            <publishedAddressPolicy>
                <publishedAddressPolicy publishedHostStrategy="IPADDRESS" />  
            </publishedAddressPolicy>
        </transportConnector>

但是,所有客户端都正在连接到代理列表中的第一个代理,而不是将其中一些重新平衡到第二个代理。

以前我们没有使用Spring JMS实现,而是直接使用ActiveMQ库。此实现确实允许重新平衡连接的客户端。

Spring阻止重新平衡吗?也许CachingConnectionFactory?

编辑2019-07-10

我在SO上找到了这两篇(p1p2)帖子,其中指出CachingConnectionFactory在故障转移协议方面的表现不佳。但是,我认为此后此问题已得到解决,因为如果关闭了代理,我们确实会看到代理之间的连接正在移动。

我们看不到经纪人之间的联系处于平衡状态。当我们仍在使用自己的定制JMS实现时,确实看到了这种行为。那么可能是Spring或JmsTemplate中的东西吗?

jms activemq spring-jms
1个回答
0
投票

实际问题不是ActiveMQ或Spring,而是外部防火墙阻止了此工作。

© www.soinside.com 2019 - 2024. All rights reserved.