Tabnine Logo
DirectMessageListenerContainer.doConsumeFromQueue
Code IndexAdd Tabnine to your IDE (free)

How to use
doConsumeFromQueue
method
in
org.springframework.amqp.rabbit.listener.DirectMessageListenerContainer

Best Java code snippets using org.springframework.amqp.rabbit.listener.DirectMessageListenerContainer.doConsumeFromQueue (Showing top 6 results out of 315)

origin: spring-projects/spring-amqp

private void consumeFromQueue(String queue) {
  List<SimpleConsumer> list = this.consumersByQueue.get(queue);
  // Possible race with setConsumersPerQueue and the task launched by start()
  if (CollectionUtils.isEmpty(list)) {
    for (int i = 0; i < this.consumersPerQueue; i++) {
      doConsumeFromQueue(queue);
    }
  }
}
origin: org.springframework.amqp/spring-rabbit

private void consumeFromQueue(String queue) {
  List<SimpleConsumer> list = this.consumersByQueue.get(queue);
  // Possible race with setConsumersPerQueue and the task launched by start()
  if (CollectionUtils.isEmpty(list)) {
    for (int i = 0; i < this.consumersPerQueue; i++) {
      doConsumeFromQueue(queue);
    }
  }
}
origin: spring-projects/spring-amqp

doConsumeFromQueue(consumer.getQueue());
return true;
origin: org.springframework.amqp/spring-rabbit

doConsumeFromQueue(consumer.getQueue());
return true;
origin: spring-projects/spring-amqp

private void adjustConsumers(int newCount) {
  synchronized (this.consumersMonitor) {
    checkStartState();
    this.consumersToRestart.clear();
    for (String queue : getQueueNames()) {
      while (this.consumersByQueue.get(queue) == null
          || this.consumersByQueue.get(queue).size() < newCount) { // NOSONAR never null
        doConsumeFromQueue(queue);
      }
      List<SimpleConsumer> consumerList = this.consumersByQueue.get(queue);
      if (consumerList != null && consumerList.size() > newCount) {
        int delta = consumerList.size() - newCount;
        for (int i = 0; i < delta; i++) {
          int index = findIdleConsumer();
          if (index >= 0) {
            SimpleConsumer consumer = consumerList.remove(index);
            if (consumer != null) {
              cancelConsumer(consumer);
            }
          }
        }
      }
    }
  }
}
origin: org.springframework.amqp/spring-rabbit

private void adjustConsumers(int newCount) {
  synchronized (this.consumersMonitor) {
    checkStartState();
    this.consumersToRestart.clear();
    for (String queue : getQueueNames()) {
      while (this.consumersByQueue.get(queue) == null
          || this.consumersByQueue.get(queue).size() < newCount) { // NOSONAR never null
        doConsumeFromQueue(queue);
      }
      List<SimpleConsumer> consumerList = this.consumersByQueue.get(queue);
      if (consumerList != null && consumerList.size() > newCount) {
        int delta = consumerList.size() - newCount;
        for (int i = 0; i < delta; i++) {
          int index = findIdleConsumer();
          if (index >= 0) {
            SimpleConsumer consumer = consumerList.remove(index);
            if (consumer != null) {
              cancelConsumer(consumer);
            }
          }
        }
      }
    }
  }
}
org.springframework.amqp.rabbit.listenerDirectMessageListenerContainerdoConsumeFromQueue

Popular methods of DirectMessageListenerContainer

  • <init>
    Create an instance with the provided connection factory.
  • setConsumersPerQueue
    Each queue runs in its own consumer; set this property to create multiple consumers for each queue.
  • setAckTimeout
    An approximate timeout; when #setMessagesPerAck(int) is greater than 1, and this time elapses since
  • setMessagesPerAck
    Set the number of messages to receive before acknowledging (success). A failed message will short-ci
  • addQueues
  • afterPropertiesSet
  • getAcknowledgeMode
  • getConnectionFactory
  • getQueueNames
  • isActive
  • isRunning
  • removeQueues
  • isRunning,
  • removeQueues,
  • setIdleEventInterval,
  • setMessageListener,
  • setMissingQueuesFatal,
  • setMonitorInterval,
  • setPrefetchCount,
  • setQueueNames,
  • actualShutDown,
  • actualStart

Popular in Java

  • Start an intent from android
  • getSupportFragmentManager (FragmentActivity)
  • requestLocationUpdates (LocationManager)
  • onRequestPermissionsResult (Fragment)
  • Font (java.awt)
    The Font class represents fonts, which are used to render text in a visible way. A font provides the
  • String (java.lang)
  • InetAddress (java.net)
    An Internet Protocol (IP) address. This can be either an IPv4 address or an IPv6 address, and in pra
  • Stack (java.util)
    Stack is a Last-In/First-Out(LIFO) data structure which represents a stack of objects. It enables u
  • TreeMap (java.util)
    Walk the nodes of the tree left-to-right or right-to-left. Note that in descending iterations, next
  • Handler (java.util.logging)
    A Handler object accepts a logging request and exports the desired messages to a target, for example
  • From CI to AI: The AI layer in your organization
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