Package io.micronaut.rabbitmq.intercept
Class RabbitMQConsumerAdvice
java.lang.Object
io.micronaut.rabbitmq.intercept.RabbitMQConsumerAdvice
- All Implemented Interfaces:
io.micronaut.context.processor.AnnotationProcessor<Queue,
,io.micronaut.inject.ExecutableMethod<?, ?>> io.micronaut.context.processor.ExecutableMethodProcessor<Queue>
,AutoCloseable
@Singleton
public class RabbitMQConsumerAdvice
extends Object
implements io.micronaut.context.processor.ExecutableMethodProcessor<Queue>, AutoCloseable
An
ExecutableMethodProcessor
that will process all beans annotated
with RabbitListener
and create and subscribe the relevant methods
as consumers to RabbitMQ queues.- Since:
- 1.1.0
- Author:
- James Kleeh
-
Constructor Summary
ConstructorDescriptionRabbitMQConsumerAdvice
(io.micronaut.context.BeanContext beanContext, io.micronaut.context.event.ApplicationEventPublisher<RabbitConsumerStarting> startingPublisher, io.micronaut.context.event.ApplicationEventPublisher<RabbitConsumerStarted> startedPublisher, RabbitBinderRegistry binderRegistry, RabbitListenerExceptionHandler exceptionHandler, RabbitMessageSerDesRegistry serDesRegistry, io.micronaut.core.convert.ConversionService conversionService, List<ChannelPool> channelPools) Default constructor.RabbitMQConsumerAdvice
(io.micronaut.context.BeanContext beanContext, RabbitBinderRegistry binderRegistry, RabbitListenerExceptionHandler exceptionHandler, RabbitMessageSerDesRegistry serDesRegistry, io.micronaut.core.convert.ConversionService conversionService, List<ChannelPool> channelPools) Deprecated, for removal: This API element is subject to removal in a future version. -
Method Summary
-
Constructor Details
-
RabbitMQConsumerAdvice
@Inject public RabbitMQConsumerAdvice(io.micronaut.context.BeanContext beanContext, io.micronaut.context.event.ApplicationEventPublisher<RabbitConsumerStarting> startingPublisher, io.micronaut.context.event.ApplicationEventPublisher<RabbitConsumerStarted> startedPublisher, RabbitBinderRegistry binderRegistry, RabbitListenerExceptionHandler exceptionHandler, RabbitMessageSerDesRegistry serDesRegistry, io.micronaut.core.convert.ConversionService conversionService, List<ChannelPool> channelPools) Default constructor.- Parameters:
beanContext
- The bean contextbinderRegistry
- The registry to bind arguments to the methodstartingPublisher
- The RabbitConsumerStarting event publisherstartedPublisher
- The RabbitConsumerStarted event publisherexceptionHandler
- The exception handler to use if the consumer isn't a handlerserDesRegistry
- The serialization/deserialization registryconversionService
- The service to convert consume argument valueschannelPools
- The channel pools to retrieve channels- Since:
- 4.1.0
-
RabbitMQConsumerAdvice
@Deprecated(since="4.1.0", forRemoval=true) public RabbitMQConsumerAdvice(io.micronaut.context.BeanContext beanContext, RabbitBinderRegistry binderRegistry, RabbitListenerExceptionHandler exceptionHandler, RabbitMessageSerDesRegistry serDesRegistry, io.micronaut.core.convert.ConversionService conversionService, List<ChannelPool> channelPools) Deprecated, for removal: This API element is subject to removal in a future version.Deprecated constructor.- Parameters:
beanContext
- The bean contextbinderRegistry
- The registry to bind arguments to the methodexceptionHandler
- The exception handler to use if the consumer isn't a handlerserDesRegistry
- The serialization/deserialization registryconversionService
- The service to convert consume argument valueschannelPools
- The channel pools to retrieve channels
-
-
Method Details
-
process
public void process(io.micronaut.inject.BeanDefinition<?> beanDefinition, io.micronaut.inject.ExecutableMethod<?, ?> method) -
close
- Specified by:
close
in interfaceAutoCloseable
- Throws:
Exception
-
RabbitMQConsumerAdvice(BeanContext, ApplicationEventPublisher, ApplicationEventPublisher, RabbitBinderRegistry, RabbitListenerExceptionHandler, RabbitMessageSerDesRegistry, ConversionService, List)
}