mirror of https://github.com/apache/activemq.git
Fixing the JMSConsumerTest case.
git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@696372 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
d453b8d390
commit
a2101b7b05
|
@ -837,7 +837,11 @@ public class ActiveMQMessageConsumer implements MessageAvailableConsumer, StatsC
|
|||
deliveredCounter++;
|
||||
if ((0.5 * info.getPrefetchSize()) <= (deliveredCounter - additionalWindowSize)) {
|
||||
MessageAck ack = new MessageAck(md, ackType, deliveredCounter);
|
||||
ack.setFirstMessageId(deliveredMessages.getLast().getMessage().getMessageId());
|
||||
if( deliveredMessages.isEmpty() ) {
|
||||
ack.setFirstMessageId(ack.getLastMessageId());
|
||||
} else {
|
||||
ack.setFirstMessageId(deliveredMessages.getLast().getMessage().getMessageId());
|
||||
}
|
||||
ack.setTransactionId(session.getTransactionContext().getTransactionId());
|
||||
session.sendAck(ack);
|
||||
additionalWindowSize = deliveredCounter;
|
||||
|
|
Loading…
Reference in New Issue