Class NatsListenerException

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

public class NatsListenerException extends io.micronaut.messaging.exceptions.MessageListenerException
Exception thrown when an error occurs processing a Nats message via a NatsListener.
Since:
1.0.0
Author:
jgrimm
See Also:
  • Constructor Details

    • NatsListenerException

      public NatsListenerException(String message, Object listener, @Nullable @Nullable io.nats.client.Message messageState)
      Creates a new exception.
      Parameters:
      message - The message
      listener - The listener
      messageState - The message
    • NatsListenerException

      public NatsListenerException(String message, Throwable cause, Object listener, @Nullable @Nullable io.nats.client.Message messageState)
      Creates a new exception.
      Parameters:
      message - The message
      cause - The cause
      listener - The listener
      messageState - The message
  • Method Details

    • getListener

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

      public Optional<io.nats.client.Message> getMessageState()
      Returns:
      The message that produced the error