activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rajdav...@apache.org
Subject svn commit: r393495 - /incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQMessageConsumer.java
Date Wed, 12 Apr 2006 16:18:40 GMT
Author: rajdavies
Date: Wed Apr 12 09:18:36 2006
New Revision: 393495

URL: http://svn.apache.org/viewcvs?rev=393495&view=rev
Log:
added support for clearing messages in-flight

Modified:
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQMessageConsumer.java

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQMessageConsumer.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQMessageConsumer.java?rev=393495&r1=393494&r2=393495&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQMessageConsumer.java
(original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQMessageConsumer.java
Wed Apr 12 09:18:36 2006
@@ -189,8 +189,9 @@
             this.session.removeConsumer(this);
             throw e;
         }
-        this.optimizeAcknowledge=session.connection.isOptimizeAcknowledge()&&session.isAutoAcknowledge();
-        if (session.connection.isStarted())
+        this.optimizeAcknowledge=session.connection.isOptimizeAcknowledge()&&session.isAutoAcknowledge()
+                        &&!info.isDurable()&&!info.getDestination().isQueue();
+        if(session.connection.isStarted())
             start();
     }
 
@@ -506,6 +507,10 @@
             dispose();
             this.session.syncSendPacket(info.createRemoveCommand());
         }
+    }
+    
+    public void clearMessagesInProgress(){
+        unconsumedMessages.clear();
     }
 
     public void dispose() throws JMSException {



Mime
View raw message