activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gtu...@apache.org
Subject svn commit: r765921 - /activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/PrefetchSubscription.java
Date Fri, 17 Apr 2009 09:36:51 GMT
Author: gtully
Date: Fri Apr 17 09:36:51 2009
New Revision: 765921

URL: http://svn.apache.org/viewvc?rev=765921&view=rev
Log:
resolve AMQ-2210|https://issues.apache.org/activemq/browse/AMQ-2210, in hindsight, it does
not make sense to wait for dispatch in anycase as the message will always get replayed at
some stage. an un dispatched ack is expected in this case so it is correct to ignore it. Revert
wait from AMQ-2149|https://issues.apache.org/activemq/browse/AMQ-2149

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=765921&r1=765920&r2=765921&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
Fri Apr 17 09:36:51 2009
@@ -192,8 +192,10 @@
         Destination destination = null;
         
         if (!isSlave()) {
-            while(!okForAckAsDispatchDone.await(100, TimeUnit.MILLISECONDS)) {
-                LOG.warn("Ack before disaptch, waiting for recovery dispatch: " + ack);
+            if (!okForAckAsDispatchDone.await(0l, TimeUnit.MILLISECONDS)) {
+                // suppress unexpected ack exception in this expected case
+                LOG.warn("Ignoring ack received before dispatch; result of failover with
an outstanding ack. Acked messages will be replayed if present on this broker. Ignored ack:
" + ack);
+                return;
             }
         }
         if (LOG.isTraceEnabled()) {



Mime
View raw message