@Override public void removeSubscription(ConnectionContext context, Subscription sub, long lastDeliveredSequenceId) throws Exception { next.removeSubscription(context, sub, lastDeliveredSequenceId); }
@Override @SuppressWarnings("unchecked") public void removeConsumer(ConnectionContext context, ConsumerInfo info) throws Exception { LOG.debug("{} removing consumer: {} for destination: {}", new Object[]{ broker.getBrokerName(), info.getConsumerId(), info.getDestination() }); Subscription sub = subscriptions.remove(info.getConsumerId()); // The sub could be removed elsewhere - see ConnectionSplitBroker if (sub != null) { // remove the subscription from all the matching queues. List<Destination> removeList = new ArrayList<Destination>(); destinationsLock.readLock().lock(); try { for (Destination dest : (Set<Destination>) destinationMap.unsynchronizedGet(info.getDestination())) { removeList.add(dest); } } finally { destinationsLock.readLock().unlock(); } for (Destination dest : removeList) { dest.removeSubscription(context, sub, info.getLastDeliveredSequenceId()); } destroySubscription(sub); } synchronized (consumerChangeMutexMap) { consumerChangeMutexMap.remove(info.getConsumerId()); } }
Subscription sub = iter.next(); if (sub.matches(destination)) { dest.removeSubscription(context, sub, 0l);
remove.removeSubscription(context, sub, info.getLastDeliveredSequenceId()); } catch (Exception ex) { LOG.error("Error unsubscribing " + sub + " from " + remove + ": " + ex.getMessage(), ex);
public void removeQueue(String queueName) { try { ActiveMQQueue destination = new ActiveMQQueue(queueName); ConnectionContext connectionContext = BrokerSupport.getConnectionContext(broker.getBroker()); Destination brokerDestination = broker.getDestination(destination); List<Subscription> consumers = brokerDestination.getConsumers(); for (Subscription consumer : consumers) { consumer.remove(connectionContext, brokerDestination); brokerDestination.removeSubscription(connectionContext, consumer, 0); } broker.getBroker().removeDestination(connectionContext, destination, 1000); broker.removeDestination(destination); } catch (Exception e) { throw bomb(e); } }
@Override public void removeSubscription(ConnectionContext context, Subscription sub, long lastDeliveredSequenceId) throws Exception { next.removeSubscription(context, sub, lastDeliveredSequenceId); }
@Override public void removeSubscription(ConnectionContext context, Subscription sub, long lastDeliveredSequenceId) throws Exception { next.removeSubscription(context, sub, lastDeliveredSequenceId); }
@Override public void removeSubscription(ConnectionContext context, Subscription sub, long lastDeliveredSequenceId) throws Exception { next.removeSubscription(context, sub, lastDeliveredSequenceId); }
public void removeSubscription(ConnectionContext context, Subscription sub, long lastDeliveredSequenceId) throws Exception { next.removeSubscription(context, sub, lastDeliveredSequenceId); }
@Override @SuppressWarnings("unchecked") public void removeConsumer(ConnectionContext context, ConsumerInfo info) throws Exception { LOG.debug("{} removing consumer: {} for destination: {}", new Object[]{ broker.getBrokerName(), info.getConsumerId(), info.getDestination() }); Subscription sub = subscriptions.remove(info.getConsumerId()); // The sub could be removed elsewhere - see ConnectionSplitBroker if (sub != null) { // remove the subscription from all the matching queues. List<Destination> removeList = new ArrayList<Destination>(); destinationsLock.readLock().lock(); try { for (Destination dest : (Set<Destination>) destinationMap.unsynchronizedGet(info.getDestination())) { removeList.add(dest); } } finally { destinationsLock.readLock().unlock(); } for (Destination dest : removeList) { dest.removeSubscription(context, sub, info.getLastDeliveredSequenceId()); } destroySubscription(sub); } synchronized (consumerChangeMutexMap) { consumerChangeMutexMap.remove(info.getConsumerId()); } }
@Override @SuppressWarnings("unchecked") public void removeConsumer(ConnectionContext context, ConsumerInfo info) throws Exception { LOG.debug("{} removing consumer: {} for destination: {}", new Object[]{ broker.getBrokerName(), info.getConsumerId(), info.getDestination() }); Subscription sub = subscriptions.remove(info.getConsumerId()); // The sub could be removed elsewhere - see ConnectionSplitBroker if (sub != null) { // remove the subscription from all the matching queues. List<Destination> removeList = new ArrayList<Destination>(); destinationsLock.readLock().lock(); try { for (Destination dest : (Set<Destination>) destinationMap.unsynchronizedGet(info.getDestination())) { removeList.add(dest); } } finally { destinationsLock.readLock().unlock(); } for (Destination dest : removeList) { dest.removeSubscription(context, sub, info.getLastDeliveredSequenceId()); } destroySubscription(sub); } synchronized (consumerChangeMutexMap) { consumerChangeMutexMap.remove(info.getConsumerId()); } }
@Override @SuppressWarnings("unchecked") public void removeConsumer(ConnectionContext context, ConsumerInfo info) throws Exception { LOG.debug("{} removing consumer: {} for destination: {}", new Object[]{ broker.getBrokerName(), info.getConsumerId(), info.getDestination() }); Subscription sub = subscriptions.remove(info.getConsumerId()); // The sub could be removed elsewhere - see ConnectionSplitBroker if (sub != null) { // remove the subscription from all the matching queues. List<Destination> removeList = new ArrayList<Destination>(); destinationsLock.readLock().lock(); try { for (Destination dest : (Set<Destination>) destinationMap.unsynchronizedGet(info.getDestination())) { removeList.add(dest); } } finally { destinationsLock.readLock().unlock(); } for (Destination dest : removeList) { dest.removeSubscription(context, sub, info.getLastDeliveredSequenceId()); } destroySubscription(sub); } synchronized (consumerChangeMutexMap) { consumerChangeMutexMap.remove(info.getConsumerId()); } }
public void removeConsumer(ConnectionContext context, ConsumerInfo info) throws Exception { LOG.debug(broker.getBrokerName() + " removing consumer: " + info.getConsumerId() + " for destination: " + info.getDestination()); Subscription sub = subscriptions.remove(info.getConsumerId()); // The sub could be removed elsewhere - see ConnectionSplitBroker if (sub != null) { // remove the subscription from all the matching queues. List<Destination> removeList = new ArrayList<Destination>(); synchronized (destinationsMutex) { for (Iterator iter = destinationMap.get(info.getDestination()).iterator(); iter.hasNext();) { Destination dest = (Destination) iter.next(); removeList.add(dest); } } for (Destination dest : removeList) { dest.removeSubscription(context, sub, info.getLastDeliveredSequenceId()); } destroySubscription(sub); } synchronized (consumerChangeMutexMap) { consumerChangeMutexMap.remove(info.getConsumerId()); } }
Subscription sub = iter.next(); if (sub.matches(destination)) { dest.removeSubscription(context, sub, 0l);
Subscription sub = iter.next(); if (sub.matches(destination)) { dest.removeSubscription(context, sub, 0l);
Subscription sub = iter.next(); if (sub.matches(destination)) { dest.removeSubscription(context, sub, 0l);
Subscription sub = iter.next(); if (sub.matches(destination)) { dest.removeSubscription(context, sub, 0l);
remove.removeSubscription(context, sub, info.getLastDeliveredSequenceId()); } catch (Exception ex) { LOG.error("Error unsubscribing " + sub + " from " + remove + ": " + ex.getMessage(), ex);
remove.removeSubscription(context, sub, info.getLastDeliveredSequenceId()); } catch (Exception ex) { LOG.error("Error unsubscribing " + sub + " from " + remove + ": " + ex.getMessage(), ex);
remove.removeSubscription(context, sub, info.getLastDeliveredSequenceId()); } catch (Exception ex) { LOG.error("Error unsubscribing " + sub + " from " + remove + ": " + ex.getMessage(), ex);