Bugs item #999660, was opened at 2004-07-28 11:44
Message generated for change (Comment added) made by genman
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=376685&aid=999660&group_id=22866

Category: JBossMQ
Group: v3.2
Status: Open
>Resolution: Later
Priority: 5
Submitted By: Tim McCune (javajedi)
Assigned to: Nobody/Anonymous (nobody)
Summary: Multiple queue receivers can starve

Initial Comment:
In BasicQueue.java, receivers is a HashSet.  The code
iterates through this set to determine who to give the
next message to.  If there are multiple receivers
listening to a single queue, most of the receivers will
starve because the receiver who happens to have the
lowest hashCode will keep jumping to the front of the
iteration order.  A simple fix of changing receivers
from a HashSet to a LinkedList (1 line change) causes
the receivers to get equal distribution of messages.  I
know this behavior is left up to the implementor in the
JMS spec, but don't you think using a list makes much
more sense?

----------------------------------------------------------------------

>Comment By: Elias Ross (genman)
Date: 2004-07-31 12:34

Message:
Logged In: YES 
user_id=556458


You can set the implementation of Receivers in the
Destination, the MBean attribute is called "ReceiversImpl"
and can be set to a linked list or array set implementation.

Refer to the latest 3.2 source.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=376685&aid=999660&group_id=22866


-------------------------------------------------------
This SF.Net email is sponsored by OSTG. Have you noticed the changes on
Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
one more big change to announce. We are now OSTG- Open Source Technology
Group. Come see the changes on the new OSTG site. www.ostg.com
_______________________________________________
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to