Class PubSubMessageReceiverException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
io.micronaut.messaging.exceptions.MessagingException
io.micronaut.messaging.exceptions.MessageListenerException
io.micronaut.gcp.pubsub.exception.PubSubMessageReceiverException
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
PubSubPushMessageReceiverException

public class PubSubMessageReceiverException extends io.micronaut.messaging.exceptions.MessageListenerException
Since:
2.0.0
Author:
Vinicius Carvalho
See Also:
  • Constructor Details

    • PubSubMessageReceiverException

      @Deprecated(since="5.1.0") public PubSubMessageReceiverException(String message, Object bean, PubSubConsumerState state)
      Deprecated.
      This exception is expected to only ever be created internally by the framework, and this form is no longer used.

      PubSubMessageReceiverException(String, Object, PubSubConsumerState, boolean) is now used instead. Any outside appropriate usage of this class (such as in exception handler tests) should be updated accordingly.

      Constructor for PubSubMessageReceiverException.
      Parameters:
      message - the exception message
      bean - the bean with the targeted Subscription method
      state - the consumer state at the time of message reception
    • PubSubMessageReceiverException

      public PubSubMessageReceiverException(String message, Object bean, PubSubConsumerState state, boolean autoAcknowledge)
      Constructor for PubSubMessageReceiverException.

      This exception is expected to only ever be created internally by the framework.

      Parameters:
      message - the exception message
      bean - the bean with the targeted Subscription method
      state - the consumer state at the time of message reception
      autoAcknowledge - whether the targeted Subscription method is set for auto acknowledgement. NOTE - custom exception handlers are responsible for handling acknowledgement on their own, regardless of the value of this property
    • PubSubMessageReceiverException

      @Deprecated(since="5.1.0") public PubSubMessageReceiverException(String message, Throwable cause, Object bean, PubSubConsumerState state)
      Deprecated.
      This exception is expected to only ever be created internally by the framework, and this form is no longer used.

      PubSubMessageReceiverException(String, Throwable, Object, PubSubConsumerState, boolean) is now used instead. Any outside appropriate usage of this class (such as in exception handler tests) should be updated accordingly.

      Constructor for PubSubMessageReceiverException.
      Parameters:
      message - the exception message
      cause - the exception cause
      bean - the bean with the targeted Subscription method
      state - the consumer state at the time of message reception
    • PubSubMessageReceiverException

      public PubSubMessageReceiverException(String message, Throwable cause, Object bean, PubSubConsumerState state, boolean autoAcknowledge)
      Constructor for PubSubMessageReceiverException.

      This exception is expected to only ever be created internally by the framework.

      Parameters:
      message - the exception message
      cause - the exception cause
      bean - the bean with the targeted Subscription method
      state - the consumer state at the time of message reception
      autoAcknowledge - whether the targeted Subscription method is set for auto acknowledgement. NOTE - custom exception handlers are responsible for handling acknowledgement on their own, regardless of the value of this property
  • Method Details

    • getListener

      public Object getListener()
      Returns:
      the bean instance annotated with @PubSubListener
    • getState

      public PubSubConsumerState getState()
      Returns:
      The state object associated with the subcription
    • isAutoAcknowledge

      public boolean isAutoAcknowledge()
      Returns:
      whether the subscription is set to automatically acknowledge messages after processing