5 Replies Latest reply on Nov 27, 2009 7:07 PM by vpothnis

    Problem with Connection Load Balancing

      Hello,

      I have a cluster of 3 HornetQ servers with server discovery. I have 'cluster connection' set up and the following is the configuration in hornetq-jms.xml.

       <connection-factory name="ConnectionFactory">
       <discovery-group-ref discovery-group-name="dg-group1"/>
       <entries>
       <entry name="ConnectionFactory"/>
       </entries>
       <connection-load-balancing-policy-class-name>
       org.hornetq.core.client.impl.RoundRobinConnectionLoadBalancingPolicy
       </connection-load-balancing-policy-class-name>
       <discovery-initial-wait-timeout>5000</discovery-initial-wait-timeout>
       <failover-on-server-shutdown>true</failover-on-server-shutdown>
       </connection-factory>
      


      On the client side, I create 3 connections and from these I create 12 consumers/message listeners.

      But, the connections and listeners do not get load balanced always. Some times they are load balanced but some times they are not.

      What could be the cause for this?

      Thanks
      Vinay