Class PubSubConsumerAdvice
- java.lang.Object
-
- io.micronaut.gcp.pubsub.intercept.PubSubConsumerAdvice
-
- All Implemented Interfaces:
io.micronaut.context.processor.AnnotationProcessor<PubSubListener,io.micronaut.inject.ExecutableMethod<?,?>>
,io.micronaut.context.processor.ExecutableMethodProcessor<PubSubListener>
@Singleton public class PubSubConsumerAdvice extends java.lang.Object implements io.micronaut.context.processor.ExecutableMethodProcessor<PubSubListener>
Implementation of anExecutableMethodProcessor
that createsMessageReceiver
that subscribes to the PubSub subscription and invoke methods annotated by @Subscription
.There can be only one subscriber for any given subscription (in order to avoid issues with message Ack control). Having more than one method using the same subscription raises a
PubSubListenerException
.- Since:
- 2.0.0
- Author:
- Vinicius Carvalho
-
-
Constructor Summary
Constructors Constructor Description PubSubConsumerAdvice(io.micronaut.context.BeanContext beanContext, io.micronaut.core.convert.ConversionService<?> conversionService, PubSubMessageSerDesRegistry serDesRegistry, SubscriberFactory subscriberFactory, GoogleCloudConfiguration googleCloudConfiguration, PubSubConfigurationProperties pubSubConfigurationProperties, PubSubBinderRegistry binderRegistry, PubSubMessageReceiverExceptionHandler exceptionHandler)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
process(io.micronaut.inject.BeanDefinition<?> beanDefinition, io.micronaut.inject.ExecutableMethod<?,?> method)
-
-
-
Constructor Detail
-
PubSubConsumerAdvice
public PubSubConsumerAdvice(io.micronaut.context.BeanContext beanContext, io.micronaut.core.convert.ConversionService<?> conversionService, PubSubMessageSerDesRegistry serDesRegistry, SubscriberFactory subscriberFactory, GoogleCloudConfiguration googleCloudConfiguration, PubSubConfigurationProperties pubSubConfigurationProperties, PubSubBinderRegistry binderRegistry, PubSubMessageReceiverExceptionHandler exceptionHandler)
-
-
Method Detail
-
process
public void process(io.micronaut.inject.BeanDefinition<?> beanDefinition, io.micronaut.inject.ExecutableMethod<?,?> method)
- Specified by:
process
in interfaceio.micronaut.context.processor.AnnotationProcessor<PubSubListener,io.micronaut.inject.ExecutableMethod<?,?>>
- Specified by:
process
in interfaceio.micronaut.context.processor.ExecutableMethodProcessor<PubSubListener>
-
-