@Override public void removeSubscription(ConnectionContext context, Subscription sub, long lastDeliveredSequenceId) throws Exception { if (!sub.getConsumerInfo().isDurable()) { boolean removed = false; synchronized (consumers) { removed = consumers.remove(sub); } if (removed) { super.removeSubscription(context, sub, lastDeliveredSequenceId); } } sub.remove(context, this); }
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); } }
List<MessageReference> unAckedMessages = sub.remove(context, this);
@Override public void removeSubscription(ConnectionContext context, Subscription sub, long lastDeliveredSequenceId) throws Exception { if (!sub.getConsumerInfo().isDurable()) { boolean removed = false; synchronized (consumers) { removed = consumers.remove(sub); } if (removed) { super.removeSubscription(context, sub, lastDeliveredSequenceId); } } sub.remove(context, this); }
@Override public void removeSubscription(ConnectionContext context, Subscription sub, long lastDeliveredSequenceId) throws Exception { if (!sub.getConsumerInfo().isDurable()) { boolean removed = false; synchronized (consumers) { removed = consumers.remove(sub); } if (removed) { super.removeSubscription(context, sub, lastDeliveredSequenceId); } } sub.remove(context, this); }
public void removeSubscription(ConnectionContext context, Subscription sub, long lastDeliveredSequenceId) throws Exception { if (!sub.getConsumerInfo().isDurable()) { super.removeSubscription(context, sub, lastDeliveredSequenceId); synchronized (consumers) { consumers.remove(sub); } } sub.remove(context, this); }
@Override public void removeSubscription(ConnectionContext context, Subscription sub, long lastDeliveredSequenceId) throws Exception { if (!sub.getConsumerInfo().isDurable()) { boolean removed = false; synchronized (consumers) { removed = consumers.remove(sub); } if (removed) { super.removeSubscription(context, sub, lastDeliveredSequenceId); } } sub.remove(context, this); }
List<MessageReference> unAckedMessages = sub.remove(context, this);
List<MessageReference> unAckedMessages = sub.remove(context, this);
List<MessageReference> unAckedMessages = sub.remove(context, this);
List<MessageReference> unAckedMessages = sub.remove(context, this);