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 78e26a956b..b185d69742 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 @@ -2302,7 +2302,6 @@ public abstract class MessageDatabase extends ServiceSupport implements BrokerSe @SuppressWarnings("rawtypes") protected final LinkedHashMap> preparedTransactions = new LinkedHashMap>(); protected final Set ackedAndPrepared = new HashSet(); - protected final Set rolledBackAcks = new HashSet(); // messages that have prepared (pending) acks cannot be re-dispatched unless the outcome is rollback, // till then they are skipped by the store. @@ -2318,16 +2317,12 @@ public abstract class MessageDatabase extends ServiceSupport implements BrokerSe } } - public void forgetRecoveredAcks(ArrayList acks, boolean rollback) throws IOException { + public void forgetRecoveredAcks(ArrayList acks) throws IOException { if (acks != null) { this.indexLock.writeLock().lock(); try { for (MessageAck ack : acks) { - final String id = ack.getLastMessageId().toProducerKey(); - ackedAndPrepared.remove(id); - if (rollback) { - rolledBackAcks.add(id); - } + ackedAndPrepared.remove(ack.getLastMessageId().toProducerKey()); } } finally { this.indexLock.writeLock().unlock(); @@ -2950,12 +2945,6 @@ public abstract class MessageDatabase extends ServiceSupport implements BrokerSe return lastGetPriority; } - public boolean alreadyDispatched(Long sequence) { - return (cursor.highPriorityCursorPosition > 0 && cursor.highPriorityCursorPosition >= sequence) || - (cursor.defaultCursorPosition > 0 && cursor.defaultCursorPosition >= sequence) || - (cursor.lowPriorityCursorPosition > 0 && cursor.lowPriorityCursorPosition >= sequence); - } - class MessageOrderIterator implements Iterator>{ Iterator>currentIterator; final Iterator>highIterator;