[jboss-user] [JBoss Messaging] - Re: Message redistibution between 2 MDB's
do-not-reply at jboss.com
Thu Apr 10 04:05:16 EDT 2008
To elaborate on what Clebert has already said - also I think this has been covered before on other threads.
JBoss Messaging has "connection load balancing" - this means that if you use a connection factory with the attribute "supportsLoadBalancing" set to true, then subsequent create connection attempts will be made on different nodes of the cluster in a round robin fashion, the first node is chosen randomly.
This gives an even distribution of connections across the cluster.
If you have a clustered queue deployed on all nodes of the cluster, and a MDB consuming on all nodes from that queue, and you send a message via one of the connections you created to one of the nodes, then, if the local MDB exists and is not busy , JBM will always *favour* the local MDB. There is no point in the message being processed on another node if it can be happily processed on the local node (it's a waste of network hops).
Here's the bit Clebert did not mention: If the local MDB does not exist or is busy, and another MDB on another node for the same queue is idle then the remote MDB can pull messages from other nodes - this is called "message redistribution".
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4143077#4143077
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4143077
More information about the jboss-user