Author: gtully
Date: Tue Jul 27 17:04:24 2010
New Revision: 979775
URL: http://svn.apache.org/viewvc?rev=979775&view=rev
Log:
resolve https://issues.apache.org/activemq/browse/AMQ-2850, still needs a
kahadb variant
Modified:
activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/KahaTopicReferenceStore.java
Modified:
activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/KahaTopicReferenceStore.java
URL:
http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/KahaTopicReferenceStore.java?rev=979775&r1=979774&r2=979775&view=diff
==============================================================================
---
activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/KahaTopicReferenceStore.java
(original)
+++
activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/kahadaptor/KahaTopicReferenceStore.java
Tue Jul 27 17:04:24 2010
@@ -106,6 +106,10 @@ public class KahaTopicReferenceStore ext
if (LOG.isTraceEnabled()) {
LOG.trace(destination.getPhysicalName() + " add reference:
" + messageId);
}
+ } else {
+ if (LOG.isTraceEnabled()) {
+ LOG.trace("no subscribers or duplicate add for: " +
messageId);
+ }
}
} finally {
lock.unlock();
@@ -182,8 +186,10 @@ public class KahaTopicReferenceStore ext
if (ackContainer.isEmpty() || subscriberMessages.size() ==
1 || isUnreferencedBySubscribers(key, subscriberMessages, messageId)) {
// no message reference held
removeMessage = true;
+ // ensure we don't later add a reference
+ dispatchAudit.isDuplicate(messageId);
if (LOG.isDebugEnabled()) {
- LOG.debug(destination.getPhysicalName() + " remove
with no outstanding reference (dup ack): " + messageId);
+ LOG.debug(destination.getPhysicalName() + " remove
with no outstanding reference (ack before add): " + messageId);
}
}
}