org.springframework.amqp.rabbit.retry
Class RejectAndDontRequeueRecoverer
java.lang.Object
org.springframework.amqp.rabbit.retry.RejectAndDontRequeueRecoverer
- All Implemented Interfaces:
- MessageRecoverer
public class RejectAndDontRequeueRecoverer
- extends Object
- implements 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
Method Summary |
void |
recover(Message message,
Throwable cause)
Callback for message that was consumed but failed all retry attempts. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RejectAndDontRequeueRecoverer
public RejectAndDontRequeueRecoverer()
recover
public void recover(Message message,
Throwable cause)
- Description copied from interface:
MessageRecoverer
- Callback for message that was consumed but failed all retry attempts.
- Specified by:
recover
in interface MessageRecoverer
- Parameters:
message
- the message to recovercause
- the cause of the error