git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@360127 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Hiram R. Chirino 2005-12-30 18:09:24 +00:00
parent eac597346c
commit 80f5e0ced1
3 changed files with 9 additions and 5 deletions

View File

@ -649,9 +649,10 @@ public class ActiveMQMessageConsumer implements MessageAvailableConsumer, StatsC
MessageAck ack = new MessageAck(lastMd, MessageAck.POSION_ACK_TYPE, deliveredMessages.size());
session.asyncSendPacket(ack);
// Adjust the counters
deliveredCounter -= deliveredMessages.size();
// Adjust the window size.
additionalWindowSize = Math.max(0, additionalWindowSize - deliveredMessages.size());
rollbackCounter = 0;
redeliveryDelay = 0;
} else {
@ -684,6 +685,7 @@ public class ActiveMQMessageConsumer implements MessageAvailableConsumer, StatsC
}
}
deliveredCounter -= deliveredMessages.size();
deliveredMessages.clear();
}

View File

@ -161,5 +161,7 @@ public class MessageDispatchChannel {
}
}
public String toString() {
return list.toString();
}
}

View File

@ -36,7 +36,7 @@ import javax.jms.Topic;
public abstract class DeadLetterTestSupport extends TestSupport {
protected int messageCount = 10;
protected long timeToLive = 250;
protected long timeToLive = 0;
protected Connection connection;
protected Session session;
protected MessageConsumer consumer;