You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Angelin Subi Johnson <an...@inautix.co.in> on 2014/08/26 08:42:01 UTC

ActiveMQ - MCollective Load Balancing

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.


<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&amp;useQueueForAccept=false&amp;transport.closeAsync=false&amp;maximumConnections=2500&amp;wireFormat.maxFrameSize=104857600&amp;jms.watchTopicAdvisories=false"
/>

           <transportConnector name="stomp+ssl"
uri="stomp+nio+ssl://0.0.0.0:61614?useQueueForAccept=false&amp;transport.closeAsync=false&amp;needClientAuth=true&amp;trace=true&amp;maximumConnections=2500&amp;wireFormat.maxFrameSize=104857600&amp;updateClusterClients=true&amp;rebalanceClusterClients=true&amp;updateClusterClientsOnRemove=true"
/>


        </transportConnectors>




    </broker>

    
    <import resource="jetty.xml"/>
</beans>


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






--
View this message in context: http://activemq.2283324.n4.nabble.com/ActiveMQ-MCollective-Load-Balancing-tp4685023.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.