MCOllective activemq load balancing

asked 2014-08-26 01:58:09 -0600

subi gravatar image

updated 2014-08-27 01:12:26 -0600

ramindk gravatar image

Hi,

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. Thanks in Advance.

activemq.xml

<beans
   xmlns="http://www.springframework.org/schema/beans"
   xmlns:amq="http://activemq.apache.org/schema/core"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd
http://activemq.apache.org/camel/schema/spring http://activemq.apache.org/camel/schema/spring/camel-spring.xsd">

<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
    <property name="locations">
        <value>file:${activemq.base}/conf/credentials.properties</value>
    </property>
</bean>

<broker xmlns="http://activemq.apache.org/schema/core" brokerName="dev-test-1" useJmx="true" schedulePeriodForDestinationPurge="60000" advisorySupport="false">

    <destinationPolicy>
      <policyMap>
        <policyEntries>
          <policyEntry topic=">" producerFlowControl="false"/>
          <policyEntry queue="*.reply.>" gcInactiveDestinations="true" inactiveTimoutBeforeGC="30000" />
        </policyEntries>
      </policyMap>
    </destinationPolicy>

    <managementContext>
        <managementContext createConnector="false"/>
    </managementContext>

 <systemUsage>
        <systemUsage>
            <memoryUsage>
                <memoryUsage limit="400 mb"/>
            </memoryUsage>
            <storeUsage>
                <storeUsage limit="2 gb" name="foo"/>
            </storeUsage>
            <tempUsage>
                <tempUsage limit="600 mb"/>
            </tempUsage>
        </systemUsage>
    </systemUsage>
    <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>
    </broker>
  <import resource="jetty.xml"/>
</beans>

server.cfg

loglevel = info
daemonize = 1
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

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 ...
(more)
edit retag flag offensive close merge delete