[jboss-user] [JBoss Messaging] - Re: Clustering differences versus JBoss MQ

timfox do-not-reply at jboss.com
Tue Jun 30 05:29:29 EDT 2009


Actually JBM 1.x does both. (BTW there is a FAQ on this, but I didn't right it so can't vouch for it's accuracy).

When using a clustered connection factory, subsequent *connections* will normally be created to different nodes of the cluster, by default in a round robin fashion.

So connection 1 might be to node B, connection 2 might be to node A, and connection 3 might be to node C. So that determines where you're messages get initially sent.

Now, when the messages reach a node, if they're non persistent and you're using a topic, then they will be instantly sent off to all the nodes where you have consumers using JGroups.

If they're persistent and/or you're using queues then they'll initially go into the local queue.

Each message consumer by default has an internal buffer of messages that it "prefetches" from the queue (this is faster than it fetching a message each time).

The local queue will first attempt to send messages to the local queue until it determines it is "busy" - busy means its buffer is full. If all local consumers are determined to be busy, then messages are eligible to be redistributed to other nodes where consumers might be idle.

If the processing time for each of your messages is significant then it might make sense for you to reduce your prefetch size (see docs) since there is little or no advantage in consumers buffering messages. You should then see a smoother distribution of messages across different nodes in the cluster.



View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4240959#4240959

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4240959



More information about the jboss-user mailing list