Bugs item #999660, was opened at 2004-07-28 14:44
Message generated for change (Tracker Item Submitted) made by Item Submitter
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: None
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?

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

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 BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click
_______________________________________________
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to