We are facing couple of issues with ActiveMQ - MCollective load balancing. Can someone please help? Below is our setup
MCO has two ActiveMQ brokers configured in failover pool - Broker1 & Broker2. And we have set randomize property to true in server.cfg
and client.cfg
.
Broker1 & Broker2 together form an activemq cluster. They also have updateClientCluster
and rebalanceClientCluster
properties set to true
(set on both activemq brokers).
Issue1: MCO clients are not equally load balanced and connected between broker1 and broker2. 700 MCO are connected to Broker1 whereas only 100 MCO connected to broker2. Are we missing any property for this loadbalancing ?
Issue2: When we add a new broker, say broker3 to activemq cluster, the MCO clients are not getting rebalanced or connecting to new broker. As per activemq documentation, if we enable updateClientCluster and rebalanceClientCluster properties, it should automatically notify MCO to rebalance. Can you please let us know any properties.
Attaching activemq.xml
, server.cfg
and client.cfg
.
activemq.xml
<transportConnectors>
<transportConnector name="openwire" uri="tcp://0.0.0.0:61616?jms.prefetchPolicy.all=1000&useQueueForAccept=false&transport.closeAsync=false&maximumConnections=2500&wireFormat.maxFrameSize=104857600&jms.watchTopicAdvisories=false" />
<transportConnector name="stomp+ssl" uri="stomp+nio+ssl://0.0.0.0:61614?useQueueForAccept=false&transport.closeAsync=false&needClientAuth=true&trace=true&maximumConnections=2500&wireFormat.maxFrameSize=104857600&updateClusterClients=true&rebalanceClusterClients=true&updateClusterClientsOnRemove=true" />
</transportConnectors>
server.cfg
loglevel = info
daemonize = 1
# Plugins
securityprovider = psk
plugin.psk = unset
connector = activemq
plugin.activemq.heartbeat_interval = 60
plugin.activemq.pool.size = 2
plugin.activemq.pool.1.host = broker 1
plugin.activemq.pool.1.port = port no.
plugin.activemq.pool.1.user = user
plugin.activemq.pool.1.password = password
plugin.activemq.pool.1.ssl = 1
plugin.activemq.pool.1.ssl.fallback = 0
#classesfile = /var/lib/puppet/state/classes.txt
# Registration:
# We don't configure a listener, and only send these messages to keep the
# Stomp connection alive. This will use the default "agentlist" registration
# plugin.
registerinterval = 600
plugin.activemq.pool.2.host = broker 1
plugin.activemq.pool.2.port = port no.
plugin.activemq.pool.2.user = user
plugin.activemq.pool.2.password = password
plugin.activemq.pool.2.ssl = 1
plugin.activemq.pool.1.ssl.fallback = 0
securityprovider = ssl
rpcauthorization = 1
rpcauthprovider = action_policy
plugin.actionpolicy.allow_unconfigured = 0
plugin.actionpolicy.enable_default = 1
plugin.actionpolicy.default_name = default
\n
plugin.activemq.initial_reconnect_delay = 0.01
plugin.activemq.max_reconnect_delay = 30.0
plugin.activemq.use_exponential_back_off = true
plugin.activemq.back_off_multiplier = 2
plugin.activemq.max_reconnect_attempts = 0
plugin.activemq.randomize = true
plugin.activemq.timeout = -1
client.cfg
main_collective = mcollective
libdir = /etc/mcollective
logger_type = console
loglevel = warn
# Plugins
securityprovider = psk
plugin.psk = unset
connector = activemq
plugin.activemq.heartbeat_interval = 60
plugin.activemq.pool.size = 2
plugin.activemq.pool.1.host = borker 1
plugin.activemq.pool.1.port = port no.
plugin.activemq.pool.1.user = user
plugin.activemq.pool.1.password = password
plugin.activemq.pool.1.ssl = 1
plugin.activemq.pool.1.ssl.fallback = 0
plugin.activemq.pool.1.host = borker 2
plugin.activemq.pool.1.port = port no.
plugin.activemq.pool.1.user = user
plugin.activemq.pool.1.password = password
plugin.activemq.pool.2.ssl = 1
plugin.activemq.pool.2.ssl.fallback = 0
factsource = yaml
securityprovider = ssl