@Singleton public class NatsConsumerAdvice extends java.lang.Object implements io.micronaut.context.processor.ExecutableMethodProcessor<Subject>, java.lang.AutoCloseable
ExecutableMethodProcessor
that will process all beans annotated with NatsListener
.
It creates and subscribes the relevant methods as consumers to Nats subjects.Constructor and Description |
---|
NatsConsumerAdvice(io.micronaut.context.BeanContext beanContext,
NatsBinderRegistry binderRegistry,
NatsMessageSerDesRegistry serDesRegistry,
NatsListenerExceptionHandler exceptionHandler)
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
process(io.micronaut.inject.BeanDefinition<?> beanDefinition,
io.micronaut.inject.ExecutableMethod<?,?> method) |
public NatsConsumerAdvice(io.micronaut.context.BeanContext beanContext, NatsBinderRegistry binderRegistry, NatsMessageSerDesRegistry serDesRegistry, NatsListenerExceptionHandler exceptionHandler)
beanContext
- The bean contextbinderRegistry
- The registry to bind arguments to the methodserDesRegistry
- The serialization/deserialization registryexceptionHandler
- The exception handler to use if the consumer isn't a handler