public void deleteSubscription(ConnectionContext context, SubscriptionKey key) throws Exception { if (topicStore != null) { topicStore.deleteSubscription(key.clientId, key.subscriptionName); DurableTopicSubscription removed = durableSubscribers.remove(key); if (removed != null) { destinationStatistics.getConsumers().decrement(); // deactivate and remove removed.deactivate(false, 0l); consumers.remove(removed); } } }
@Override public void removeConsumer(ConnectionContext context, ConsumerInfo info) throws Exception { if (info.isDurable()) { SubscriptionKey key = new SubscriptionKey(context.getClientId(), info.getSubscriptionName()); DurableTopicSubscription sub = durableSubscriptions.get(key); if (sub != null) { // deactivate only if given context is same // as what is in the sub. otherwise, during linksteal // sub will get new context, but will be removed here if (sub.getContext() == context) { sub.deactivate(keepDurableSubsActive, info.getLastDeliveredSequenceId()); } } } else { super.removeConsumer(context, info); } }
sub.info = info; sub.context = context; sub.deactivate(keepDurableSubsActive, info.getLastDeliveredSequenceId());
public void deleteSubscription(ConnectionContext context, SubscriptionKey key) throws Exception { if (topicStore != null) { topicStore.deleteSubscription(key.clientId, key.subscriptionName); DurableTopicSubscription removed = durableSubscribers.remove(key); if (removed != null) { destinationStatistics.getConsumers().decrement(); // deactivate and remove removed.deactivate(false, 0l); consumers.remove(removed); } } }
public void deleteSubscription(ConnectionContext context, SubscriptionKey key) throws Exception { if (topicStore != null) { topicStore.deleteSubscription(key.clientId, key.subscriptionName); DurableTopicSubscription removed = durableSubscribers.remove(key); if (removed != null) { destinationStatistics.getConsumers().decrement(); // deactivate and remove removed.deactivate(false, 0l); consumers.remove(removed); } } }
public void deleteSubscription(ConnectionContext context, SubscriptionKey key) throws Exception { if (topicStore != null) { topicStore.deleteSubscription(key.clientId, key.subscriptionName); DurableTopicSubscription removed = durableSubscribers.remove(key); if (removed != null) { destinationStatistics.getConsumers().decrement(); // deactivate and remove removed.deactivate(false, 0l); consumers.remove(removed); } } }
public void deleteSubscription(ConnectionContext context, SubscriptionKey key) throws Exception { if (topicStore != null) { topicStore.deleteSubscription(key.clientId, key.subscriptionName); DurableTopicSubscription removed = durableSubcribers.remove(key); if (removed != null) { destinationStatistics.getConsumers().decrement(); // deactivate and remove removed.deactivate(false); consumers.remove(removed); } } }
@Override public void removeConsumer(ConnectionContext context, ConsumerInfo info) throws Exception { if (info.isDurable()) { SubscriptionKey key = new SubscriptionKey(context.getClientId(), info.getSubscriptionName()); DurableTopicSubscription sub = durableSubscriptions.get(key); if (sub != null) { sub.deactivate(keepDurableSubsActive); } } else { super.removeConsumer(context, info); } }
@Override public void removeConsumer(ConnectionContext context, ConsumerInfo info) throws Exception { if (info.isDurable()) { SubscriptionKey key = new SubscriptionKey(context.getClientId(), info.getSubscriptionName()); DurableTopicSubscription sub = durableSubscriptions.get(key); if (sub != null) { // deactivate only if given context is same // as what is in the sub. otherwise, during linksteal // sub will get new context, but will be removed here if (sub.getContext() == context) { sub.deactivate(keepDurableSubsActive, info.getLastDeliveredSequenceId()); } } } else { super.removeConsumer(context, info); } }
@Override public void removeConsumer(ConnectionContext context, ConsumerInfo info) throws Exception { if (info.isDurable()) { SubscriptionKey key = new SubscriptionKey(context.getClientId(), info.getSubscriptionName()); DurableTopicSubscription sub = durableSubscriptions.get(key); if (sub != null) { // deactivate only if given context is same // as what is in the sub. otherwise, during linksteal // sub will get new context, but will be removed here if (sub.getContext() == context) { sub.deactivate(keepDurableSubsActive, info.getLastDeliveredSequenceId()); } } } else { super.removeConsumer(context, info); } }
@Override public void removeConsumer(ConnectionContext context, ConsumerInfo info) throws Exception { if (info.isDurable()) { SubscriptionKey key = new SubscriptionKey(context.getClientId(), info.getSubscriptionName()); DurableTopicSubscription sub = durableSubscriptions.get(key); if (sub != null) { // deactivate only if given context is same // as what is in the sub. otherwise, during linksteal // sub will get new context, but will be removed here if (sub.getContext() == context) { sub.deactivate(keepDurableSubsActive, info.getLastDeliveredSequenceId()); } } } else { super.removeConsumer(context, info); } }
sub.info = info; sub.context = context; sub.deactivate(keepDurableSubsActive, info.getLastDeliveredSequenceId());
sub.info = info; sub.context = context; sub.deactivate(keepDurableSubsActive, info.getLastDeliveredSequenceId());
sub.info = info; sub.context = context; sub.deactivate(keepDurableSubsActive, info.getLastDeliveredSequenceId());