mirror of https://github.com/apache/activemq.git
git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1326692 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
04aa9c5161
commit
fb915c3dc6
|
@ -2002,12 +2002,14 @@ public abstract class MessageDatabase extends ServiceSupport implements BrokerSe
|
|||
|
||||
// Check if the message is reference by any other subscription.
|
||||
Long count = sd.messageReferences.get(messageSequence);
|
||||
if (count != null){
|
||||
long references = count.longValue() - 1;
|
||||
if (references > 0) {
|
||||
sd.messageReferences.put(messageSequence, Long.valueOf(references));
|
||||
return;
|
||||
} else {
|
||||
sd.messageReferences.remove(messageSequence);
|
||||
if (references > 0) {
|
||||
sd.messageReferences.put(messageSequence, Long.valueOf(references));
|
||||
return;
|
||||
} else {
|
||||
sd.messageReferences.remove(messageSequence);
|
||||
}
|
||||
}
|
||||
|
||||
// Find all the entries that need to get deleted.
|
||||
|
|
Loading…
Reference in New Issue