Messages stuck in a queue don't get dispatch (happens when consumers close out)


git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@658370 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Hiram R. Chirino 2008-05-20 18:15:48 +00:00
parent 926ce535e5
commit ff46232797
1 changed files with 5 additions and 0 deletions

View File

@ -138,6 +138,11 @@ public abstract class PrefetchSubscription extends AbstractSubscription {
public void add(MessageReference node) throws Exception {
synchronized (pendingLock) {
// The destination may have just been removed...
if( !destinations.contains(node.getRegionDestination()) ) {
// perhaps we should inform the caller that we are no longer valid to dispatch to?
return;
}
enqueueCounter++;
pending.addMessageLast(node);
}