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

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

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

origin: spring-projects/spring-amqp

@Nullable
private SimpleConsumer handleConsumeException(String queue, SimpleConsumer consumerArg, Exception e) {
  SimpleConsumer consumer = consumerArg;
  if (e.getCause() instanceof ShutdownSignalException
      && e.getCause().getMessage().contains("in exclusive use")) {
    getExclusiveConsumerExceptionLogger().log(logger,
        "Exclusive consumer failure", e.getCause());
    publishConsumerFailedEvent("Consumer raised exception, attempting restart", false, e);
  }
  else if (e.getCause() instanceof ShutdownSignalException
      && RabbitUtils.isPassiveDeclarationChannelClose((ShutdownSignalException) e.getCause())) {
    this.logger.error("Queue not present, scheduling consumer "
      + (consumer == null ? "for queue " + queue : consumer) + " for restart", e);
  }
  else if (this.logger.isWarnEnabled()) {
    this.logger.warn("basicConsume failed, scheduling consumer "
        + (consumer == null ? "for queue " + queue : consumer) + " for restart", e);
  }
  if (consumer == null) {
    addConsumerToRestart(new SimpleConsumer(null, null, queue));
  }
  else {
    addConsumerToRestart(consumer);
    consumer = null;
  }
  return consumer;
}
origin: org.springframework.amqp/spring-rabbit

@Nullable
private SimpleConsumer handleConsumeException(String queue, SimpleConsumer consumerArg, Exception e) {
  SimpleConsumer consumer = consumerArg;
  if (e.getCause() instanceof ShutdownSignalException
      && e.getCause().getMessage().contains("in exclusive use")) {
    getExclusiveConsumerExceptionLogger().log(logger,
        "Exclusive consumer failure", e.getCause());
    publishConsumerFailedEvent("Consumer raised exception, attempting restart", false, e);
  }
  else if (e.getCause() instanceof ShutdownSignalException
      && RabbitUtils.isPassiveDeclarationChannelClose((ShutdownSignalException) e.getCause())) {
    this.logger.error("Queue not present, scheduling consumer "
      + (consumer == null ? "for queue " + queue : consumer) + " for restart", e);
  }
  else if (this.logger.isWarnEnabled()) {
    this.logger.warn("basicConsume failed, scheduling consumer "
        + (consumer == null ? "for queue " + queue : consumer) + " for restart", e);
  }
  if (consumer == null) {
    addConsumerToRestart(new SimpleConsumer(null, null, queue));
  }
  else {
    addConsumerToRestart(consumer);
    consumer = null;
  }
  return consumer;
}
org.springframework.amqp.rabbit.listenerDirectMessageListenerContainergetExclusiveConsumerExceptionLogger

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

  • Finding current android device location
  • requestLocationUpdates (LocationManager)
  • notifyDataSetChanged (ArrayAdapter)
  • setScale (BigDecimal)
  • SocketTimeoutException (java.net)
    This exception is thrown when a timeout expired on a socket read or accept operation.
  • Calendar (java.util)
    Calendar is an abstract base class for converting between a Date object and a set of integer fields
  • Random (java.util)
    This class provides methods that return pseudo-random values.It is dangerous to seed Random with the
  • Collectors (java.util.stream)
  • JButton (javax.swing)
  • DateTimeFormat (org.joda.time.format)
    Factory that creates instances of DateTimeFormatter from patterns and styles. Datetime formatting i
  • 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