Class AmqpRejectAndDontRequeueException

  • All Implemented Interfaces:
    Serializable

    public class AmqpRejectAndDontRequeueException
    extends AmqpException
    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:
    Serialized Form
    • Constructor Detail

      • AmqpRejectAndDontRequeueException

        public AmqpRejectAndDontRequeueException​(String message)
        Construct an instance with the supplied argument.
        Parameters:
        message - A message describing the problem.
      • AmqpRejectAndDontRequeueException

        public AmqpRejectAndDontRequeueException​(Throwable cause)
        Construct an instance with the supplied argument.
        Parameters:
        cause - the cause.
      • AmqpRejectAndDontRequeueException

        public AmqpRejectAndDontRequeueException​(String message,
                                                 Throwable cause)
        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 Detail

      • isRejectManual

        public boolean isRejectManual()
        True if the container should reject the message, even with manual acks.
        Returns:
        true to reject.