Class ContainerUtils

java.lang.Object
org.springframework.amqp.rabbit.listener.support.ContainerUtils

@Deprecated(forRemoval=true, since="4.1") public final class ContainerUtils extends Object
Deprecated, for removal: This API element is subject to removal in a future version.
in favor of ContainerUtils
Utility methods for listener containers.
Since:
2.1
  • Method Summary

    Modifier and Type
    Method
    Description
    static boolean
    Deprecated, for removal: This API element is subject to removal in a future version.
    Return true for AmqpRejectAndDontRequeueException.
    static boolean
    Deprecated, for removal: This API element is subject to removal in a future version.
    Return true for ImmediateAcknowledgeAmqpException.
    static boolean
    Deprecated, for removal: This API element is subject to removal in a future version.
    Return true for AmqpRejectAndDontRequeueException.isRejectManual().
    static boolean
    shouldRequeue(boolean defaultRequeueRejected, Throwable throwable, org.apache.commons.logging.Log logger)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Determine whether a message should be requeued; returns true if the throwable is a MessageRejectedWhileStoppingException or defaultRequeueRejected is true and there is not an AmqpRejectAndDontRequeueException in the cause chain or if there is an ImmediateRequeueAmqpException in the cause chain.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • shouldRequeue

      public static boolean shouldRequeue(boolean defaultRequeueRejected, Throwable throwable, org.apache.commons.logging.Log logger)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Determine whether a message should be requeued; returns true if the throwable is a MessageRejectedWhileStoppingException or defaultRequeueRejected is true and there is not an AmqpRejectAndDontRequeueException in the cause chain or if there is an ImmediateRequeueAmqpException in the cause chain.
      Parameters:
      defaultRequeueRejected - the default requeue rejected.
      throwable - the throwable.
      logger - the logger to use for debug.
      Returns:
      true to requeue.
    • isRejectManual

      public static boolean isRejectManual(Throwable ex)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Return true for AmqpRejectAndDontRequeueException.isRejectManual().
      Parameters:
      ex - the exception.
      Returns:
      the exception's rejectManual property, if it's an AmqpRejectAndDontRequeueException.
      Since:
      2.2
    • isImmediateAcknowledge

      public static boolean isImmediateAcknowledge(Throwable ex)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Return true for ImmediateAcknowledgeAmqpException.
      Parameters:
      ex - the exception to traverse.
      Returns:
      true if an ImmediateAcknowledgeAmqpException is present in the cause chain.
      Since:
      4.0
    • isAmqpReject

      public static boolean isAmqpReject(Throwable ex)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Return true for AmqpRejectAndDontRequeueException.
      Parameters:
      ex - the exception to traverse.
      Returns:
      true if an AmqpRejectAndDontRequeueException is present in the cause chain.
      Since:
      4.0