Package org.springframework.amqp
Class AmqpRejectAndDontRequeueException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.springframework.amqp.AmqpException
org.springframework.amqp.AmqpRejectAndDontRequeueException
- All Implemented Interfaces:
Serializable
Exception for listener implementations used to indicate the
basic.reject will be sent with requeue=false in order to enable
features such as DLQ.
- Since:
- 1.0.1
- Author:
- Gary Russell
- See Also:
-
Constructor Summary
ConstructorDescriptionAmqpRejectAndDontRequeueException
(String message) Construct an instance with the supplied argument.AmqpRejectAndDontRequeueException
(String message, boolean rejectManual, Throwable cause) Construct an instance with the supplied arguments.AmqpRejectAndDontRequeueException
(String message, Throwable cause) Construct an instance with the supplied arguments.Construct an instance with the supplied argument. -
Method Summary
Modifier and TypeMethodDescriptionboolean
True if the container should reject the message, even with manual acks.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
AmqpRejectAndDontRequeueException
Construct an instance with the supplied argument.- Parameters:
message
- A message describing the problem.
-
AmqpRejectAndDontRequeueException
Construct an instance with the supplied argument.- Parameters:
cause
- the cause.
-
AmqpRejectAndDontRequeueException
Construct an instance with the supplied arguments.- Parameters:
message
- A message describing the problem.cause
- the cause.
-
AmqpRejectAndDontRequeueException
public AmqpRejectAndDontRequeueException(@Nullable String message, boolean rejectManual, @Nullable Throwable cause) Construct an instance with the supplied arguments.- Parameters:
message
- A message describing the problem.rejectManual
- true to reject the message, even with Manual Acks if this is the top-level exception (e.g. thrown by an error handler).cause
- the cause.- Since:
- 2.1.9
-
-
Method Details
-
isRejectManual
public boolean isRejectManual()True if the container should reject the message, even with manual acks.- Returns:
- true to reject.
-