congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
TopicRegion.getDurableSubscription
Code IndexAdd Tabnine to your IDE (free)

How to use
getDurableSubscription
method
in
org.apache.activemq.broker.region.TopicRegion

Best Java code snippets using org.apache.activemq.broker.region.TopicRegion.getDurableSubscription (Showing top 4 results out of 315)

origin: apache/activemq

@Override
public void removeSubscription(ConnectionContext context, RemoveSubscriptionInfo info) throws Exception {
  SubscriptionKey key = new SubscriptionKey(context.getClientId(), info.getSubscriptionName());
  RegionBroker regionBroker = null;
  if (next instanceof RegionBroker) {
    regionBroker = (RegionBroker) next;
  } else {
    BrokerService service = next.getBrokerService();
    regionBroker = (RegionBroker) service.getRegionBroker();
  }
  if (regionBroker == null) {
    LOG.warn("Cannot locate a RegionBroker instance to pass along the removeSubscription call");
    throw new IllegalStateException("No RegionBroker found.");
  }
  DurableTopicSubscription sub = ((TopicRegion) regionBroker.getTopicRegion()).getDurableSubscription(key);
  super.removeSubscription(context, info);
  if (sub == null) {
    LOG.warn("We cannot send an advisory message for a durable sub removal when we don't know about the durable sub");
    return;
  }
  ActiveMQDestination dest = sub.getConsumerInfo().getDestination();
  // Don't advise advisory topics.
  if (!AdvisorySupport.isAdvisoryTopic(dest)) {
    ActiveMQTopic topic = AdvisorySupport.getConsumerAdvisoryTopic(dest);
    fireConsumerAdvisory(context, dest, topic, info);
  }
}
origin: org.apache.activemq/activemq-all

@Override
public void removeSubscription(ConnectionContext context, RemoveSubscriptionInfo info) throws Exception {
  SubscriptionKey key = new SubscriptionKey(context.getClientId(), info.getSubscriptionName());
  RegionBroker regionBroker = null;
  if (next instanceof RegionBroker) {
    regionBroker = (RegionBroker) next;
  } else {
    BrokerService service = next.getBrokerService();
    regionBroker = (RegionBroker) service.getRegionBroker();
  }
  if (regionBroker == null) {
    LOG.warn("Cannot locate a RegionBroker instance to pass along the removeSubscription call");
    throw new IllegalStateException("No RegionBroker found.");
  }
  DurableTopicSubscription sub = ((TopicRegion) regionBroker.getTopicRegion()).getDurableSubscription(key);
  super.removeSubscription(context, info);
  if (sub == null) {
    LOG.warn("We cannot send an advisory message for a durable sub removal when we don't know about the durable sub");
    return;
  }
  ActiveMQDestination dest = sub.getConsumerInfo().getDestination();
  // Don't advise advisory topics.
  if (!AdvisorySupport.isAdvisoryTopic(dest)) {
    ActiveMQTopic topic = AdvisorySupport.getConsumerAdvisoryTopic(dest);
    fireConsumerAdvisory(context, dest, topic, info);
  }
}
origin: org.apache.activemq/activemq-broker

@Override
public void removeSubscription(ConnectionContext context, RemoveSubscriptionInfo info) throws Exception {
  SubscriptionKey key = new SubscriptionKey(context.getClientId(), info.getSubscriptionName());
  RegionBroker regionBroker = null;
  if (next instanceof RegionBroker) {
    regionBroker = (RegionBroker) next;
  } else {
    BrokerService service = next.getBrokerService();
    regionBroker = (RegionBroker) service.getRegionBroker();
  }
  if (regionBroker == null) {
    LOG.warn("Cannot locate a RegionBroker instance to pass along the removeSubscription call");
    throw new IllegalStateException("No RegionBroker found.");
  }
  DurableTopicSubscription sub = ((TopicRegion) regionBroker.getTopicRegion()).getDurableSubscription(key);
  super.removeSubscription(context, info);
  if (sub == null) {
    LOG.warn("We cannot send an advisory message for a durable sub removal when we don't know about the durable sub");
    return;
  }
  ActiveMQDestination dest = sub.getConsumerInfo().getDestination();
  // Don't advise advisory topics.
  if (!AdvisorySupport.isAdvisoryTopic(dest)) {
    ActiveMQTopic topic = AdvisorySupport.getConsumerAdvisoryTopic(dest);
    fireConsumerAdvisory(context, dest, topic, info);
  }
}
origin: org.apache.activemq/activemq-osgi

@Override
public void removeSubscription(ConnectionContext context, RemoveSubscriptionInfo info) throws Exception {
  SubscriptionKey key = new SubscriptionKey(context.getClientId(), info.getSubscriptionName());
  RegionBroker regionBroker = null;
  if (next instanceof RegionBroker) {
    regionBroker = (RegionBroker) next;
  } else {
    BrokerService service = next.getBrokerService();
    regionBroker = (RegionBroker) service.getRegionBroker();
  }
  if (regionBroker == null) {
    LOG.warn("Cannot locate a RegionBroker instance to pass along the removeSubscription call");
    throw new IllegalStateException("No RegionBroker found.");
  }
  DurableTopicSubscription sub = ((TopicRegion) regionBroker.getTopicRegion()).getDurableSubscription(key);
  super.removeSubscription(context, info);
  if (sub == null) {
    LOG.warn("We cannot send an advisory message for a durable sub removal when we don't know about the durable sub");
    return;
  }
  ActiveMQDestination dest = sub.getConsumerInfo().getDestination();
  // Don't advise advisory topics.
  if (!AdvisorySupport.isAdvisoryTopic(dest)) {
    ActiveMQTopic topic = AdvisorySupport.getConsumerAdvisoryTopic(dest);
    fireConsumerAdvisory(context, dest, topic, info);
  }
}
org.apache.activemq.broker.regionTopicRegiongetDurableSubscription

Popular methods of TopicRegion

  • <init>
  • createConsumerId
  • createDestination
  • createInactiveConsumerInfo
  • createSubscription
  • destroySubscription
  • durableSubscriptionExists
  • hasDurableSubChanged
  • lookup
  • removeDestination
  • setKeepDurableSubsActive
  • doCleanup
  • setKeepDurableSubsActive,
  • doCleanup,
  • getDestinations,
  • getDurableSubscriptions,
  • getSubscriptions,
  • lookupSubscriptions,
  • removeSubscription,
  • lookupSubscription

Popular in Java

  • Start an intent from android
  • compareTo (BigDecimal)
  • setScale (BigDecimal)
  • startActivity (Activity)
  • InputStreamReader (java.io)
    A class for turning a byte stream into a character stream. Data read from the source input stream is
  • Proxy (java.net)
    This class represents proxy server settings. A created instance of Proxy stores a type and an addres
  • Timestamp (java.sql)
    A Java representation of the SQL TIMESTAMP type. It provides the capability of representing the SQL
  • Iterator (java.util)
    An iterator over a sequence of objects, such as a collection.If a collection has been changed since
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • AtomicInteger (java.util.concurrent.atomic)
    An int value that may be updated atomically. See the java.util.concurrent.atomic package specificati
  • Top 17 Plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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