Class RabbitListenerException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
io.micronaut.messaging.exceptions.MessagingException
io.micronaut.messaging.exceptions.MessageListenerException
io.micronaut.rabbitmq.exception.RabbitListenerException
All Implemented Interfaces:
Serializable

public class RabbitListenerException extends io.micronaut.messaging.exceptions.MessageListenerException
Exception thrown when an error occurs processing a RabbitMQ message via a RabbitListener.
Since:
1.1.0
Author:
James Kleeh
See Also:
  • Constructor Details

    • RabbitListenerException

      public RabbitListenerException(String message, Object listener, @Nullable @Nullable RabbitConsumerState messageState)
      Creates a new exception.
      Parameters:
      message - The message
      listener - The listener
      messageState - The message
    • RabbitListenerException

      public RabbitListenerException(String message, Throwable cause, Object listener, @Nullable @Nullable RabbitConsumerState messageState)
      Creates a new exception.
      Parameters:
      message - The message
      cause - The cause
      listener - The listener
      messageState - The message
    • RabbitListenerException

      public RabbitListenerException(Throwable cause, Object listener, @Nullable @Nullable RabbitConsumerState messageState)
      Creates a new exception.
      Parameters:
      cause - The cause
      listener - The listener
      messageState - The message
  • Method Details

    • getListener

      public Object getListener()
      Returns:
      The bean that is the kafka listener
    • getMessageState

      public Optional<RabbitConsumerState> getMessageState()
      Returns:
      The consumer that produced the error