activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r1490745 - /activemq/trunk/activemq-broker/src/main/java/org/apache/activemq/broker/region/QueueSubscription.java
Date Fri, 07 Jun 2013 17:34:03 GMT
Author: tabish
Date: Fri Jun  7 17:34:03 2013
New Revision: 1490745

URL: http://svn.apache.org/r1490745
Log:
fix for: https://issues.apache.org/jira/browse/AMQ-4577

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

Modified: activemq/trunk/activemq-broker/src/main/java/org/apache/activemq/broker/region/QueueSubscription.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-broker/src/main/java/org/apache/activemq/broker/region/QueueSubscription.java?rev=1490745&r1=1490744&r2=1490745&view=diff
==============================================================================
--- activemq/trunk/activemq-broker/src/main/java/org/apache/activemq/broker/region/QueueSubscription.java
(original)
+++ activemq/trunk/activemq-broker/src/main/java/org/apache/activemq/broker/region/QueueSubscription.java
Fri Jun  7 17:34:03 2013
@@ -17,8 +17,9 @@
 package org.apache.activemq.broker.region;
 
 import java.io.IOException;
-import javax.jms.InvalidSelectorException;
+
 import javax.jms.JMSException;
+
 import org.apache.activemq.broker.Broker;
 import org.apache.activemq.broker.ConnectionContext;
 import org.apache.activemq.broker.region.group.MessageGroupMap;
@@ -41,24 +42,28 @@ public class QueueSubscription extends P
     /**
      * In the queue case, mark the node as dropped and then a gc cycle will
      * remove it from the queue.
-     * 
+     *
      * @throws IOException
      */
+    @Override
     protected void acknowledge(final ConnectionContext context, final MessageAck ack, final
MessageReference n) throws IOException {
         final Destination q = (Destination) n.getRegionDestination();
         final QueueMessageReference node = (QueueMessageReference)n;
         final Queue queue = (Queue)q;
-        
+
         if (n.isExpired()) {
             // sync with message expiry processing
             if (!broker.isExpired(n)) {
-                LOG.warn("ignoring ack " + ack + ", for already expired message: " + n);
+                if (LOG.isDebugEnabled()) {
+                    LOG.debug("ignoring ack {}, for already expired message: {}", ack, n);
+                }
                 return;
             }
         }
         queue.removeMessage(context, this, node, ack);
     }
 
+    @Override
     protected boolean canDispatch(MessageReference n) throws IOException {
         boolean result = true;
         QueueMessageReference node = (QueueMessageReference)n;
@@ -86,26 +91,31 @@ public class QueueSubscription extends P
         }
     }
 
+    @Override
     public synchronized String toString() {
         return "QueueSubscription:" + " consumer=" + info.getConsumerId() + ", destinations="
+ destinations.size() + ", dispatched=" + dispatched.size() + ", delivered="
                + this.prefetchExtension + ", pending=" + getPendingQueueSize();
     }
 
+    @Override
     public int getLockPriority() {
         return info.getPriority();
     }
 
+    @Override
     public boolean isLockExclusive() {
         return info.isExclusive();
     }
 
     /**
      */
+    @Override
     public void destroy() {
         setSlowConsumer(false);
     }
 
-   
+
+    @Override
     protected boolean isDropped(MessageReference node) {
        boolean result = false;
        if(node instanceof IndirectMessageReference) {



Mime
View raw message