Class ImmediateRetryAsyncErrorHandler<T>
java.lang.Object
io.awspring.cloud.sqs.listener.errorhandler.ImmediateRetryAsyncErrorHandler<T>
- All Implemented Interfaces:
AsyncErrorHandler<T>
A default error handler implementation for asynchronous message processing.
This error handler attempts to set the SQS message visibility timeout to zero whenever an exception occurs, effectively making the message immediately available for reprocessing.
When AcknowledgementMode is set to ON_SUCCESS (the default value), returning a failed future will prevent the message from being acknowledged
- Author:
- Bruno Garcia, Rafael Pavarini
-
Constructor Details
-
ImmediateRetryAsyncErrorHandler
public ImmediateRetryAsyncErrorHandler()
-
-
Method Details
-
handle
Description copied from interface:AsyncErrorHandlerAsynchronously handle the errors thrown processing the givenMessage.- Specified by:
handlein interfaceAsyncErrorHandler<T>- Parameters:
message- the message.t- the thrown exception.- Returns:
- a completable future.
-
handle
Description copied from interface:AsyncErrorHandlerAsynchronously handle the errors thrown processing the givenMessageinstances.- Specified by:
handlein interfaceAsyncErrorHandler<T>- Parameters:
messages- the messages.t- the thrown exception.- Returns:
- a completable future.
-