From 93439b285341a2888160dddbbb7517e870a7e9e2 Mon Sep 17 00:00:00 2001 From: "Hiram R. Chirino" Date: Mon, 22 Sep 2008 14:32:03 +0000 Subject: [PATCH] Don't set the first message id if it's not known. It gets calcuated on the server side. git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@697850 13f79535-47bb-0310-9956-ffa450edef68 --- .../java/org/apache/activemq/ActiveMQMessageConsumer.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/activemq-core/src/main/java/org/apache/activemq/ActiveMQMessageConsumer.java b/activemq-core/src/main/java/org/apache/activemq/ActiveMQMessageConsumer.java index b38b6e5cc4..ab7c5989a5 100755 --- a/activemq-core/src/main/java/org/apache/activemq/ActiveMQMessageConsumer.java +++ b/activemq-core/src/main/java/org/apache/activemq/ActiveMQMessageConsumer.java @@ -837,9 +837,7 @@ public class ActiveMQMessageConsumer implements MessageAvailableConsumer, StatsC deliveredCounter++; if ((0.5 * info.getPrefetchSize()) <= (deliveredCounter - additionalWindowSize)) { MessageAck ack = new MessageAck(md, ackType, deliveredCounter); - if( deliveredMessages.isEmpty() ) { - ack.setFirstMessageId(ack.getLastMessageId()); - } else { + if( !deliveredMessages.isEmpty() ) { ack.setFirstMessageId(deliveredMessages.getLast().getMessage().getMessageId()); } ack.setTransactionId(session.getTransactionContext().getTransactionId());