Class ConditionalRejectingErrorHandler

java.lang.Object
org.springframework.amqp.listener.ConditionalRejectingErrorHandler
org.springframework.amqp.rabbit.listener.ConditionalRejectingErrorHandler
All Implemented Interfaces:
org.springframework.util.ErrorHandler

@Deprecated(forRemoval=true, since="4.1") public class ConditionalRejectingErrorHandler extends org.springframework.amqp.listener.ConditionalRejectingErrorHandler
Deprecated, for removal: This API element is subject to removal in a future version.
in favor of ConditionalRejectingErrorHandler
ErrorHandler that conditionally wraps the Exception in an AmqpRejectAndDontRequeueException if the configured rejection strategy determines that the message is fatal and should not be requeued. Such messages will be discarded or sent to a Dead Letter Exchange, depending on broker configuration.

The default strategy will do this if the exception is a ListenerExecutionFailedException with a cause of MessageConversionException, MessageConversionException, MethodArgumentNotValidException, MethodArgumentTypeMismatchException, NoSuchMethodException or ClassCastException.

The exception will not be wrapped if the cause chain already contains an AmqpRejectAndDontRequeueException.

Since:
1.3.2
  • Nested Class Summary

    Nested classes/interfaces inherited from class org.springframework.amqp.listener.ConditionalRejectingErrorHandler

    org.springframework.amqp.listener.ConditionalRejectingErrorHandler.DefaultExceptionStrategy
  • Field Summary

    Fields inherited from class org.springframework.amqp.listener.ConditionalRejectingErrorHandler

    logger
  • Constructor Summary

    Constructors
    Constructor
    Description
    Deprecated, for removal: This API element is subject to removal in a future version.
    Create a handler with the ConditionalRejectingErrorHandler.DefaultExceptionStrategy.
    ConditionalRejectingErrorHandler(org.springframework.amqp.listener.FatalExceptionStrategy exceptionStrategy)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Create a handler with the supplied FatalExceptionStrategy implementation.
  • Method Summary

    Methods inherited from class org.springframework.amqp.listener.ConditionalRejectingErrorHandler

    causeChainContainsARADRE, getExceptionStrategy, handleDiscarded, handleError, isDiscardFatalsWithXDeath, isRejectManual, log, setDiscardFatalsWithXDeath, setRejectManual

    Methods inherited from class Object

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

    • ConditionalRejectingErrorHandler

      public ConditionalRejectingErrorHandler()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Create a handler with the ConditionalRejectingErrorHandler.DefaultExceptionStrategy.
    • ConditionalRejectingErrorHandler

      public ConditionalRejectingErrorHandler(org.springframework.amqp.listener.FatalExceptionStrategy exceptionStrategy)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Create a handler with the supplied FatalExceptionStrategy implementation.
      Parameters:
      exceptionStrategy - The strategy implementation.