Load balancing issue in ActiveMQ Clustering
mmkrishna2008 Sep 27, 2010 11:58 AMHi,
I am new to ActiveMQ . I am facing an issue with ActiveMQ Load Balancing.
We have 3 ActiveMQ instance running on different systems.
Broker-1 has 2 Consumers, Broker-2 has 1 consumer, Broker-3 has 1 consumer
We have used Discovery agent to identify the brokers dynamically in client application
discovery:(multicast://default)?initialReconnectDelay=100
Load Balancing issue
-
So Whenever any producer is sending messages to the queue , its picking up the broker dynamically
and all the messages are processed by consumers listening on that broker only. Other consumers
connected on other two brokers are not consuming the messages.
Only one broker is processing all the messages.
Failover is working fine.
i tried networkTTL (with value 3 and more) option also its not working 4 me.
Here i am adding ActiveMQ Broker Configuration for reference.
Let me know if i have done anything wrong.
Broker-1 Configuration
-
<broker xmlns="http://activemq.org/config/1.0"
brokerName="broker-1"
dataDirectory="${activemq.base}/data">
</broker>
<transportConnectors>
<transportConnector name="openwire" uri="tcp://host1:61616"
discoveryUri="multicast://default"/>
</transportConnectors>
<networkConnectors>
<networkConnector name="default-nc" uri="multicast://default"
networkTTL="3" dynamicOnly="true" conduitSubscriptions="false"/>
</networkConnectors>
Broker-2 Configuration
-
<broker xmlns="http://activemq.org/config/1.0"
brokerName="broker-2"
dataDirectory="${activemq.base}/data">
</broker>
<transportConnectors>
<transportConnector name="openwire" uri="tcp://host2:61616"
discoveryUri="multicast://default"/>
</transportConnectors>
<networkConnectors>
<networkConnector name="default-nc" uri="multicast://default"
networkTTL="3" dynamicOnly="true" conduitSubscriptions="false"/>
</networkConnectors>
Broker-3 Configuration
-
<broker xmlns="http://activemq.org/config/1.0"
brokerName="broker-3"
dataDirectory="${activemq.base}/data">
</broker>
<transportConnectors>
<transportConnector name="openwire" uri="tcp://host3:61616"
discoveryUri="multicast://default"/>
</transportConnectors>
<networkConnectors>
<networkConnector name="default-nc" uri="multicast://default"
networkTTL="3" dynamicOnly="true" conduitSubscriptions="false"/>
</networkConnectors>
Thanks,
Murali