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

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

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

origin: org.springframework.amqp/spring-rabbit

@Override
protected void initializeContainer(DirectMessageListenerContainer instance, RabbitListenerEndpoint endpoint) {
  super.initializeContainer(instance, endpoint);
  if (this.taskScheduler != null) {
    instance.setTaskScheduler(this.taskScheduler);
  }
  if (this.monitorInterval != null) {
    instance.setMonitorInterval(this.monitorInterval);
  }
  if (endpoint != null && endpoint.getConcurrency() != null) {
    try {
      instance.setConsumersPerQueue(Integer.parseInt(endpoint.getConcurrency()));
    }
    catch (NumberFormatException e) {
      throw new IllegalStateException("Failed to parse concurrency: " + e.getMessage(), e);
    }
  }
  else if (this.consumersPerQueue != null) {
    instance.setConsumersPerQueue(this.consumersPerQueue);
  }
}
origin: spring-projects/spring-amqp

@Override
protected void initializeContainer(DirectMessageListenerContainer instance, RabbitListenerEndpoint endpoint) {
  super.initializeContainer(instance, endpoint);
  if (this.taskScheduler != null) {
    instance.setTaskScheduler(this.taskScheduler);
  }
  if (this.monitorInterval != null) {
    instance.setMonitorInterval(this.monitorInterval);
  }
  if (endpoint != null && endpoint.getConcurrency() != null) {
    try {
      instance.setConsumersPerQueue(Integer.parseInt(endpoint.getConcurrency()));
    }
    catch (NumberFormatException e) {
      throw new IllegalStateException("Failed to parse concurrency: " + e.getMessage(), e);
    }
  }
  else if (this.consumersPerQueue != null) {
    instance.setConsumersPerQueue(this.consumersPerQueue);
  }
  if (this.messagesPerAck != null) {
    instance.setMessagesPerAck(this.messagesPerAck);
  }
  if (this.ackTimeout != null) {
    instance.setAckTimeout(this.ackTimeout);
  }
}
origin: spring-projects/spring-amqp

container.setTaskScheduler(this.taskScheduler);
origin: org.springframework.amqp/spring-rabbit

container.setTaskScheduler(this.taskScheduler);
org.springframework.amqp.rabbit.listenerDirectMessageListenerContainersetTaskScheduler

Javadoc

Set the task scheduler to use for the task that monitors idle containers and failed consumers.

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

  • Making http post requests using okhttp
  • getSharedPreferences (Context)
  • startActivity (Activity)
  • setRequestProperty (URLConnection)
  • BufferedWriter (java.io)
    Wraps an existing Writer and buffers the output. Expensive interaction with the underlying reader is
  • RandomAccessFile (java.io)
    Allows reading from and writing to a file in a random-access manner. This is different from the uni-
  • BitSet (java.util)
    The BitSet class implements abit array [http://en.wikipedia.org/wiki/Bit_array]. Each element is eit
  • TimerTask (java.util)
    The TimerTask class represents a task to run at a specified time. The task may be run once or repeat
  • JFrame (javax.swing)
  • Response (javax.ws.rs.core)
    Defines the contract between a returned instance and the runtime when an application needs to provid
  • Top plugins for WebStorm
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