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 Summary
ConstructorDescriptionPubSubMessageReceiverException
(String message, Object bean, PubSubConsumerState state, boolean autoAcknowledge) Constructor for PubSubMessageReceiverException.PubSubMessageReceiverException
(String message, Throwable cause, Object bean, PubSubConsumerState state, boolean autoAcknowledge) Constructor for PubSubMessageReceiverException. -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
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 messagebean
- the bean with the targetedSubscription
methodstate
- the consumer state at the time of message receptionautoAcknowledge
- whether the targetedSubscription
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
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 messagecause
- the exception causebean
- the bean with the targetedSubscription
methodstate
- the consumer state at the time of message receptionautoAcknowledge
- whether the targetedSubscription
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
- Returns:
- the bean instance annotated with @
PubSubListener
-
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
-