From 4ab55f13ae4097de1dad14af36b65a89eda9b81d Mon Sep 17 00:00:00 2001 From: Dejan Bosanac Date: Thu, 10 Sep 2015 11:10:13 +0200 Subject: [PATCH] https://issues.apache.org/jira/browse/AMQ-5960 - durable sub pendingQueueSize after force shutdown --- .../org/apache/activemq/store/kahadb/MessageDatabase.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/activemq-kahadb-store/src/main/java/org/apache/activemq/store/kahadb/MessageDatabase.java b/activemq-kahadb-store/src/main/java/org/apache/activemq/store/kahadb/MessageDatabase.java index b3fcfaa659..5240b7516c 100644 --- a/activemq-kahadb-store/src/main/java/org/apache/activemq/store/kahadb/MessageDatabase.java +++ b/activemq-kahadb-store/src/main/java/org/apache/activemq/store/kahadb/MessageDatabase.java @@ -1347,6 +1347,13 @@ public abstract class MessageDatabase extends ServiceSupport implements BrokerSe // be wrong.. sd.locationIndex.put(tx, location, previous); metadata.lastUpdate = location; + // remove ack positions + Iterator> it = sd.ackPositions.iterator(tx); + while (it.hasNext()) { + Entry entry = it.next(); + entry.getValue().remove(id); + } + } // record this id in any event, initial send or recovery metadata.producerSequenceIdTracker.isDuplicate(command.getMessageId());