You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by bh...@apache.org on 2007/03/23 17:20:53 UTC

svn commit: r521793 - /incubator/qpid/branches/M2/java/perftests/src/main/java/org/apache/qpid/requestreply/PingPongProducer.java

Author: bhupendrab
Date: Fri Mar 23 09:20:52 2007
New Revision: 521793

URL: http://svn.apache.org/viewvc?view=rev&rev=521793
Log: (empty)

Modified:
    incubator/qpid/branches/M2/java/perftests/src/main/java/org/apache/qpid/requestreply/PingPongProducer.java

Modified: incubator/qpid/branches/M2/java/perftests/src/main/java/org/apache/qpid/requestreply/PingPongProducer.java
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/M2/java/perftests/src/main/java/org/apache/qpid/requestreply/PingPongProducer.java?view=diff&rev=521793&r1=521792&r2=521793
==============================================================================
--- incubator/qpid/branches/M2/java/perftests/src/main/java/org/apache/qpid/requestreply/PingPongProducer.java (original)
+++ incubator/qpid/branches/M2/java/perftests/src/main/java/org/apache/qpid/requestreply/PingPongProducer.java Fri Mar 23 09:20:52 2007
@@ -39,6 +39,7 @@
 import org.apache.qpid.client.AMQNoConsumersException;
 import org.apache.qpid.client.AMQQueue;
 import org.apache.qpid.client.AMQTopic;
+import org.apache.qpid.client.AMQSession;
 import org.apache.qpid.client.message.TestMessageFactory;
 import org.apache.qpid.exchange.ExchangeDefaults;
 import org.apache.qpid.jms.MessageProducer;
@@ -734,6 +735,12 @@
                     if ((remainingCount % _txBatchSize) == 0)
                     {
                         commitTx(_consumerSession);
+                        if (!_consumerSession.getTransacted() &&
+                            _consumerSession.getAcknowledgeMode() == Session.CLIENT_ACKNOWLEDGE)
+                        {
+                            // Acknowledge the messages when the session is not transacted but client_ack
+                            ((AMQSession) _consumerSession).acknowledge();
+                        }
                     }
 
                     // Forward the message and remaining count to any interested chained message listener.