经纪人的ActiveMQ网络:具有rebalanceClusterClients和updateClusterClients的随机连接 [英] ActiveMQ network of brokers: random conectivity with rebalanceClusterClients and updateClusterClients

查看:195
本文介绍了经纪人的ActiveMQ网络:具有rebalanceClusterClients和updateClusterClients的随机连接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个具有以下配置的经纪人网络

I have a network of brokers with the following configuration

  <transportConnectors>
        <transportConnector name="tomer-amq-test2" uri="tcp://0.0.0.0:61616" updateClusterClients="true" rebalanceClusterClients="true" updateClusterClientsOnRemove="true"/>
  </transportConnectors>

我希望当我使用URL连接时

I expect that when I connect using the URL

failover:\(tcp://tomer-amq-test2:61616\)?backup=true 

经纪人也应使用被切断的经纪人的完整列表更新客户端,并且该客户端应随机连接到另一个,作为备份的第二个

但是这没有发生,客户端仅连接到url中指定的代理

the broker shall update th client with the full list of brokers it is conencted too, and the client shall connect to one randomly, and to a second as backup
however this is not happening and the client connects only to the specified broker in the url

帮助任何人?

Tx Tomer

help anyone?
Tx Tomer

推荐答案

找出了问题所在(至少在我的环境中如此)

,当一个经纪人更新另一个正在运行的经纪人时,它通过服务器名称标识自己。

一旦将所有代理的服务器名称添加到客户端的/ etc / hosts中,一切都很好

:)

我认为这是一个不好的做法,代理应该通过ip而不是主机名来标识自己

figured out the problem (at least on my env)
when a broker updates another broker that it is up, it identifies itself by the server name.
once the server name of all brokers was added to /etc/hosts on the client side, all was well
:)
I guess this is bad practice, and the broker should identify itself by ip and not by hostname

我在ubuntu 10.4上运行了activeMQ 5.5.1

I was running activeMQ 5.5.1 on ubuntu 10.4

这篇关于经纪人的ActiveMQ网络:具有rebalanceClusterClients和updateClusterClients的随机连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆