Class RejectAndDontRequeueRecoverer
java.lang.Object
org.springframework.amqp.rabbit.retry.RejectAndDontRequeueRecoverer
- All Implemented Interfaces:
MessageRecoverer
MessageRecover that causes the listener container to reject
the message without requeuing. This enables failed messages
to be sent to a Dead Letter Exchange/Queue, if the broker is
so configured.
- Since:
- 1.1.2
- Author:
- Gary Russell
-
Field Summary
-
Constructor Summary
ConstructorDescriptionConstruct an instance with the default exception message.RejectAndDontRequeueRecoverer
(String message) Construct an instance with the provided exception message.RejectAndDontRequeueRecoverer
(Supplier<String> messageSupplier) Construct an instance with the provided exception message supplier. -
Method Summary
-
Field Details
-
logger
-
-
Constructor Details
-
RejectAndDontRequeueRecoverer
public RejectAndDontRequeueRecoverer()Construct an instance with the default exception message. -
RejectAndDontRequeueRecoverer
Construct an instance with the provided exception message.- Parameters:
message
- the message.- Since:
- 2.3.7
-
RejectAndDontRequeueRecoverer
Construct an instance with the provided exception message supplier.- Parameters:
messageSupplier
- the message supplier.- Since:
- 2.3.7
-
-
Method Details
-
recover
Description copied from interface:MessageRecoverer
Callback for message that was consumed but failed all retry attempts.- Specified by:
recover
in interfaceMessageRecoverer
- Parameters:
message
- the message to recovercause
- the cause of the error
-