From fb14a2042dd5bdae5a5c79b8cd4f1ad87e59bee1 Mon Sep 17 00:00:00 2001 From: Bhupendra Bhusman Bhardwaj Date: Tue, 27 Mar 2007 09:07:30 +0000 Subject: merged from M2 (r521792:522567) QPID-408 QPID-421 QPID-428 git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@522821 13f79535-47bb-0310-9956-ffa450edef68 --- .../main/java/org/apache/qpid/requestreply/PingPongProducer.java | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'java/perftests') diff --git a/java/perftests/src/main/java/org/apache/qpid/requestreply/PingPongProducer.java b/java/perftests/src/main/java/org/apache/qpid/requestreply/PingPongProducer.java index 2a3aff4692..c6a69807a3 100644 --- a/java/perftests/src/main/java/org/apache/qpid/requestreply/PingPongProducer.java +++ b/java/perftests/src/main/java/org/apache/qpid/requestreply/PingPongProducer.java @@ -39,6 +39,7 @@ import org.apache.qpid.client.AMQDestination; 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; @@ -723,6 +724,12 @@ public class PingPongProducer implements Runnable, MessageListener, ExceptionLis 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. -- cgit v1.2.1