activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r658370 - /activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/PrefetchSubscription.java
Date Tue, 20 May 2008 18:15:49 GMT
Author: chirino
Date: Tue May 20 11:15:48 2008
New Revision: 658370

URL: http://svn.apache.org/viewvc?rev=658370&view=rev
Log:
Fix for: https://issues.apache.org/activemq/browse/AMQ-1738
Messages stuck in a queue don't get dispatch (happens when consumers close out)

Modified:
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/PrefetchSubscription.java

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/PrefetchSubscription.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/PrefetchSubscription.java?rev=658370&r1=658369&r2=658370&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/PrefetchSubscription.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/PrefetchSubscription.java
Tue May 20 11:15:48 2008
@@ -138,6 +138,11 @@
 
     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);    
         }



Mime
View raw message