Package io.jaconi.spring.rabbitmq.retry
Class RetryErrorHandler
java.lang.Object
org.springframework.amqp.rabbit.listener.ConditionalRejectingErrorHandler
io.jaconi.spring.rabbitmq.retry.RetryErrorHandler
- All Implemented Interfaces:
org.springframework.util.ErrorHandler
@Component("retryErrorHandler")
public class RetryErrorHandler
extends org.springframework.amqp.rabbit.listener.ConditionalRejectingErrorHandler
Custom error handling for RabbitMQ. By default, Spring AMQP retries most exceptions by immediately requeuing the
causing message. This error handler rejects any messages causing an exception in the listener. If messages should be
retried, the listener code can throw a
RetryMessagesException. The messages in the
RetryMessagesException are retried as configured in the RetryProperties.-
Nested Class Summary
Nested classes/interfaces inherited from class org.springframework.amqp.rabbit.listener.ConditionalRejectingErrorHandler
org.springframework.amqp.rabbit.listener.ConditionalRejectingErrorHandler.DefaultExceptionStrategy -
Field Summary
Fields inherited from class org.springframework.amqp.rabbit.listener.ConditionalRejectingErrorHandler
logger -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.springframework.amqp.rabbit.listener.ConditionalRejectingErrorHandler
causeChainContainsARADRE, getExceptionStrategy, handleDiscarded, isDiscardFatalsWithXDeath, isRejectManual, log, setDiscardFatalsWithXDeath, setRejectManual
-
Constructor Details
-
RetryErrorHandler
public RetryErrorHandler(org.springframework.amqp.core.AmqpTemplate amqpTemplate)
-
-
Method Details
-
handleError
- Specified by:
handleErrorin interfaceorg.springframework.util.ErrorHandler- Overrides:
handleErrorin classorg.springframework.amqp.rabbit.listener.ConditionalRejectingErrorHandler
-