Tabnine Logo
Destination.removeSubscription
Code IndexAdd Tabnine to your IDE (free)

How to use
removeSubscription
method
in
org.apache.activemq.broker.region.Destination

Best Java code snippets using org.apache.activemq.broker.region.Destination.removeSubscription (Showing top 20 results out of 315)

origin: apache/activemq

@Override
public void removeSubscription(ConnectionContext context, Subscription sub, long lastDeliveredSequenceId) throws Exception {
  next.removeSubscription(context, sub, lastDeliveredSequenceId);
}
origin: apache/activemq

@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());
  }
}
origin: apache/activemq

Subscription sub = iter.next();
if (sub.matches(destination)) {
  dest.removeSubscription(context, sub, 0l);
origin: apache/activemq

  remove.removeSubscription(context, sub, info.getLastDeliveredSequenceId());
} catch (Exception ex) {
  LOG.error("Error unsubscribing " + sub + " from " + remove + ": " + ex.getMessage(), ex);
origin: gocd/gocd

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);
  }
}
origin: org.apache.activemq/activemq-all

@Override
public void removeSubscription(ConnectionContext context, Subscription sub, long lastDeliveredSequenceId) throws Exception {
  next.removeSubscription(context, sub, lastDeliveredSequenceId);
}
origin: org.apache.activemq/activemq-broker

@Override
public void removeSubscription(ConnectionContext context, Subscription sub, long lastDeliveredSequenceId) throws Exception {
  next.removeSubscription(context, sub, lastDeliveredSequenceId);
}
origin: org.apache.activemq/activemq-osgi

@Override
public void removeSubscription(ConnectionContext context, Subscription sub, long lastDeliveredSequenceId) throws Exception {
  next.removeSubscription(context, sub, lastDeliveredSequenceId);
}
origin: pierre/meteo

public void removeSubscription(ConnectionContext context, Subscription sub, long lastDeliveredSequenceId) throws Exception {
  next.removeSubscription(context, sub, lastDeliveredSequenceId);
}
origin: org.apache.activemq/activemq-broker

@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());
  }
}
origin: org.apache.activemq/activemq-all

@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());
  }
}
origin: org.apache.activemq/activemq-osgi

@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());
  }
}
origin: pierre/meteo

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());
  }
}
origin: org.apache.activemq/activemq-broker

Subscription sub = iter.next();
if (sub.matches(destination)) {
  dest.removeSubscription(context, sub, 0l);
origin: pierre/meteo

Subscription sub = iter.next();
if (sub.matches(destination)) {
  dest.removeSubscription(context, sub, 0l);
origin: org.apache.activemq/activemq-all

Subscription sub = iter.next();
if (sub.matches(destination)) {
  dest.removeSubscription(context, sub, 0l);
origin: org.apache.activemq/activemq-osgi

Subscription sub = iter.next();
if (sub.matches(destination)) {
  dest.removeSubscription(context, sub, 0l);
origin: org.apache.activemq/activemq-broker

  remove.removeSubscription(context, sub, info.getLastDeliveredSequenceId());
} catch (Exception ex) {
  LOG.error("Error unsubscribing " + sub + " from " + remove + ": " + ex.getMessage(), ex);
origin: org.apache.activemq/activemq-all

  remove.removeSubscription(context, sub, info.getLastDeliveredSequenceId());
} catch (Exception ex) {
  LOG.error("Error unsubscribing " + sub + " from " + remove + ": " + ex.getMessage(), ex);
origin: org.apache.activemq/activemq-osgi

  remove.removeSubscription(context, sub, info.getLastDeliveredSequenceId());
} catch (Exception ex) {
  LOG.error("Error unsubscribing " + sub + " from " + remove + ": " + ex.getMessage(), ex);
org.apache.activemq.broker.regionDestinationremoveSubscription

Popular methods of Destination

  • getConsumers
  • getDestinationStatistics
  • getName
  • getActiveMQDestination
  • browse
  • acknowledge
  • addProducer
  • addSubscription
  • dispose
  • fastProducer
    Called to notify a producer is too fast
  • gc
  • getBlockedProducerWarningInterval
  • gc,
  • getBlockedProducerWarningInterval,
  • getCursorMemoryHighWaterMark,
  • getDeadLetterStrategy,
  • getMaxAuditDepth,
  • getMaxBrowsePageSize,
  • getMaxPageSize,
  • getMaxProducersToAudit,
  • getMemoryUsage

Popular in Java

  • Reactive rest calls using spring rest template
  • getSupportFragmentManager (FragmentActivity)
  • notifyDataSetChanged (ArrayAdapter)
  • getSharedPreferences (Context)
  • Thread (java.lang)
    A thread is a thread of execution in a program. The Java Virtual Machine allows an application to ha
  • ArrayList (java.util)
    ArrayList is an implementation of List, backed by an array. All optional operations including adding
  • Arrays (java.util)
    This class contains various methods for manipulating arrays (such as sorting and searching). This cl
  • ZipFile (java.util.zip)
    This class provides random read access to a zip file. You pay more to read the zip file's central di
  • JButton (javax.swing)
  • IOUtils (org.apache.commons.io)
    General IO stream manipulation utilities. This class provides static utility methods for input/outpu
  • Top Vim plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now