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

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

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

origin: spring-projects/spring-integration

/**
 * @param ackTimeout the ack timeout.
 * @return the spec.
 * @see DirectMessageListenerContainer#setAckTimeout(long)
 */
public DirectMessageListenerContainerSpec ackTimeout(long ackTimeout) {
  this.listenerContainer.setAckTimeout(ackTimeout);
  return this;
}
origin: org.springframework.integration/spring-integration-amqp

/**
 * @param ackTimeout the ack timeout.
 * @return the spec.
 * @see DirectMessageListenerContainer#setAckTimeout(long)
 */
public DirectMessageListenerContainerSpec ackTimeout(long ackTimeout) {
  this.listenerContainer.setAckTimeout(ackTimeout);
  return this;
}
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.setMonitorInterval(100);
container.setMessagesPerAck(10);
container.setAckTimeout(100);
container.setMessageListener(m -> {
  if (m.getMessageProperties().getDeliveryTag() == 19L) {
org.springframework.amqp.rabbit.listenerDirectMessageListenerContainersetAckTimeout

Javadoc

An approximate timeout; when #setMessagesPerAck(int) is greater than 1, and this time elapses since the last ack, the pending acks will be sent either when the next message arrives, or a short time later if no additional messages arrive. In that case, the actual time depends on the #setMonitorInterval(long).

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.
  • 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
  • setIdleEventInterval
  • removeQueues,
  • setIdleEventInterval,
  • setMessageListener,
  • setMissingQueuesFatal,
  • setMonitorInterval,
  • setPrefetchCount,
  • setQueueNames,
  • actualShutDown,
  • actualStart

Popular in Java

  • Making http post requests using okhttp
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • requestLocationUpdates (LocationManager)
  • putExtra (Intent)
  • Menu (java.awt)
  • KeyStore (java.security)
    KeyStore is responsible for maintaining cryptographic keys and their owners. The type of the syste
  • UUID (java.util)
    UUID is an immutable representation of a 128-bit universally unique identifier (UUID). There are mul
  • ServletException (javax.servlet)
    Defines a general exception a servlet can throw when it encounters difficulty.
  • Table (org.hibernate.mapping)
    A relational table
  • Scheduler (org.quartz)
    This is the main interface of a Quartz Scheduler. A Scheduler maintains a registry of org.quartz.Job
  • Top 12 Jupyter Notebook extensions
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