Class DefaultPubSubMessageReceiverExceptionHandler

java.lang.Object
io.micronaut.gcp.pubsub.exception.DefaultPubSubMessageReceiverExceptionHandler
All Implemented Interfaces:
io.micronaut.core.exceptions.ExceptionHandler<PubSubMessageReceiverException>, PubSubMessageReceiverExceptionHandler

@Singleton @Primary public class DefaultPubSubMessageReceiverExceptionHandler extends Object implements PubSubMessageReceiverExceptionHandler
Handles any exception on beans of type PubSubListener that do not implement PubSubMessageReceiverExceptionHandler interface.

Logs the error, and explicitly sends a nack signal (if the targeted Subscription has not declared an Acknowledgement parameter to indicate manually handled acknowledgement) so that PubSub will immediately process the failure and attempt re-delivery if the subscription is so configured.

For Subscription methods that do manually handle acknowledgement, the user should provide a custom implementation of PubSubMessageReceiverExceptionHandler.

Since:
2.0.0
Author:
Vinicius Carvalho
  • Constructor Details

    • DefaultPubSubMessageReceiverExceptionHandler

      public DefaultPubSubMessageReceiverExceptionHandler()
  • Method Details