SubscriptionInfo[] infos = store.getAllSubscriptions();
for (int i = 0; i < infos.length; i++) {
SubscriptionInfo info = infos[i];
LOG.debug("Restoring durable subscription: " + info);
SubscriptionKey key = new SubscriptionKey(info);
// A single durable sub may be subscribing to multiple topics.
// so it might exist already.
DurableTopicSubscription sub = durableSubscriptions.get(key);
ConsumerInfo consumerInfo = createInactiveConsumerInfo(info);
if (sub == null) {
ConnectionContext c = new ConnectionContext();
c.setBroker(context.getBroker());
c.setClientId(key.getClientId());
c.setConnectionId(consumerInfo.getConsumerId().getParentId().getParentId());
sub = (DurableTopicSubscription)createSubscription(c, consumerInfo);
}
if (dupChecker.contains(sub)) {