9 Replies Latest reply on Sep 24, 2009 4:46 PM by Brian Stansberry

    Load Balancing in Jboss 5.1 , not able to test it !

    Leonardo Battagli Newbie

      Hi all !
      this is the first time for me posting here !

      Let's describe the situation:

      I have configured in the same machine (changing all the ports in bindings-jboss-beans.xml) a two node cluster.
      I have configured both the 'ClusteredConnectionFactory' and the 'ClusteredPullConnectionFactory' with failover and load balancing.
      I have set the LoadBalancingFactory = org.jboss.jms.client.plugin.RoundRobinLoadBalancingFactory

      Then in the queue configuration I've added my queue definition with clustered sets to 'true'
      I have modified my code adding @Clustered annotation in the MDBs.

      Both the two nodes starts up correctly and the cluster is up and running.

      I had also set up a client application , running on Tomcat, which simply connect to the ConnectionFactory using the partition name (DefaultPartition).

      Here are my result trying to test the load balancing and failover :

      Nodo1 up and running (HAJNDI port 1100, JNDI port 1099)
      Nodo2 up and running (HAJNDI port 1103, JNDI port 1097)
      Client application up and running (Tomcat)

      A web-app on tomcat connect and send a Jms message

      The Jms message has been consumed on Nodo2

      All the subsequent Jms messages sent by the client are forwarded to Node2 (Not a single message has been forward to Node1!)

      Nodo2 has been Stopped

      All the subsequent Jms messages sent by the client are NOW forwarded to Node1 (Node1 is now the only node being part of the cluster)

      Nodo2 has been Restarted

      All the subsequent Jms messages sent by the client are NOW AGAIN forwarded to Node1 (Not a single message has been forwarded to the reborn Node2!)


      I understand that failover is working !
      But the load balancing it is not !

      Anyone can help me find out how to test this load balancing feature ?!?

      thks in advance