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.
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
ConstructorsConstructorDescriptionDeprecated, for removal: This API element is subject to removal in a future version.Create a handler with theConditionalRejectingErrorHandler.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 suppliedFatalExceptionStrategyimplementation. -
Method Summary
Methods inherited from class org.springframework.amqp.listener.ConditionalRejectingErrorHandler
causeChainContainsARADRE, getExceptionStrategy, handleDiscarded, handleError, isDiscardFatalsWithXDeath, isRejectManual, log, setDiscardFatalsWithXDeath, setRejectManual
-
Constructor Details
-
ConditionalRejectingErrorHandler
public ConditionalRejectingErrorHandler()Deprecated, for removal: This API element is subject to removal in a future version.Create a handler with theConditionalRejectingErrorHandler.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 suppliedFatalExceptionStrategyimplementation.- Parameters:
exceptionStrategy- The strategy implementation.
-
ConditionalRejectingErrorHandler