We are using JBoss 3.2.1 version. We have three nodes (say node1, node2 and node3) and on each node we have 2 MDBs listening to a queue on a single node (say node1). We have limited the MDBs to 2 each to achieve load balancing. The idea was that when there are more than 2 messages coming at the same time, they be processed on different nodes.
The problem we are facing is that when we place 8 messages at the same time, the first 2 gets picked up by the MDBs on a particular node (say node2 - this changes every time we restart the servers) and starts processing immediately. The next four gets cached, and the next two goes to another node (say node1) and gets processed over there. The four that gets cached gets processed only on node2 and not on any other node.
We would require your help to understand this behaviour of messages getting cached and to fix this issue so that the messages are processed first come first basis. Now what is happening is, whenever the number of messages are lesser than or equal to six they always get processed on the same node, two at a time and doesn't get distributed among the nodes.
Thanks in advance.
There is a load balancing configuration for a queue, check the wiki. It's probably only JBoss 3.2.x , where x > 1.