if (receivedCount > ackStartIndex) {
if (receivedCount >= removeIndex + ackWindow) {
for (int j = 0; j < ackBatchSize; j++, removeIndex++) {
ackedCount.incrementAndGet();
MessageAck ack = new MessageAck();
ack.setLastMessageId(new MessageId(mesageIdRoot
+ removeIndex));
ack.setMessageCount(1);
queue.removeMessage(contextNotInTx, subscription,
new IndirectMessageReference(
getMessage(removeIndex)), ack);