mirror of https://github.com/apache/activemq.git
git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@608034 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
409902c394
commit
a0b3e3211e
|
@ -301,16 +301,18 @@ public class KahaTopicReferenceStore extends KahaReferenceStore implements Topic
|
|||
String containerName = getSubscriptionContainerName(subscriberKey);
|
||||
subscriberContainer.remove(subscriberKey);
|
||||
TopicSubContainer container = subscriberMessages.remove(subscriberKey);
|
||||
for (Iterator i = container.iterator(); i.hasNext();) {
|
||||
ConsumerMessageRef ref = (ConsumerMessageRef)i.next();
|
||||
if (ref != null) {
|
||||
TopicSubAck tsa = ackContainer.get(ref.getAckEntry());
|
||||
if (tsa != null) {
|
||||
if (tsa.decrementCount() <= 0) {
|
||||
ackContainer.remove(ref.getAckEntry());
|
||||
messageContainer.remove(tsa.getMessageEntry());
|
||||
} else {
|
||||
ackContainer.update(ref.getAckEntry(), tsa);
|
||||
if (container != null) {
|
||||
for (Iterator i = container.iterator(); i.hasNext();) {
|
||||
ConsumerMessageRef ref = (ConsumerMessageRef)i.next();
|
||||
if (ref != null) {
|
||||
TopicSubAck tsa = ackContainer.get(ref.getAckEntry());
|
||||
if (tsa != null) {
|
||||
if (tsa.decrementCount() <= 0) {
|
||||
ackContainer.remove(ref.getAckEntry());
|
||||
messageContainer.remove(tsa.getMessageEntry());
|
||||
} else {
|
||||
ackContainer.update(ref.getAckEntry(), tsa);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue