mirror of https://github.com/apache/activemq.git
When recovering durable subscriptions - ensure they are recovered only once
git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@628778 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
4a8ade0fae
commit
900c9af498
|
@ -19,6 +19,7 @@ package org.apache.activemq.store.kahadaptor;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
import java.util.HashSet;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
@ -253,8 +254,8 @@ public class KahaReferenceStoreAdapter extends KahaPersistenceAdapter implements
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public void recoverState() throws IOException {
|
public void recoverState() throws IOException {
|
||||||
for (Iterator<SubscriptionInfo> i = durableSubscribers.iterator(); i.hasNext();) {
|
Set<SubscriptionInfo> set = new HashSet<SubscriptionInfo>(this.durableSubscribers);
|
||||||
SubscriptionInfo info = i.next();
|
for (SubscriptionInfo info:set) {
|
||||||
LOG.info("Recovering subscriber state for durable subscriber: " + info);
|
LOG.info("Recovering subscriber state for durable subscriber: " + info);
|
||||||
TopicReferenceStore ts = createTopicReferenceStore((ActiveMQTopic)info.getDestination());
|
TopicReferenceStore ts = createTopicReferenceStore((ActiveMQTopic)info.getDestination());
|
||||||
ts.addSubsciption(info, false);
|
ts.addSubsciption(info, false);
|
||||||
|
|
Loading…
Reference in New Issue