activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r697850 - /activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQMessageConsumer.java
Date Mon, 22 Sep 2008 14:32:05 GMT
Author: chirino
Date: Mon Sep 22 07:32:03 2008
New Revision: 697850

URL: http://svn.apache.org/viewvc?rev=697850&view=rev
Log:
Don't set the first message id if it's not known. It gets calcuated on the server side.


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

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQMessageConsumer.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQMessageConsumer.java?rev=697850&r1=697849&r2=697850&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQMessageConsumer.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQMessageConsumer.java
Mon Sep 22 07:32:03 2008
@@ -837,9 +837,7 @@
         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());



Mime
View raw message