Class MultiRabbitListenerAnnotationBeanPostProcessor
java.lang.Object
org.springframework.amqp.rabbit.annotation.RabbitListenerAnnotationBeanPostProcessor
org.springframework.amqp.rabbit.annotation.MultiRabbitListenerAnnotationBeanPostProcessor
- All Implemented Interfaces:
Aware
,BeanClassLoaderAware
,BeanFactoryAware
,BeanPostProcessor
,SmartInitializingSingleton
,EnvironmentAware
,Ordered
public class MultiRabbitListenerAnnotationBeanPostProcessor
extends RabbitListenerAnnotationBeanPostProcessor
An extension of
RabbitListenerAnnotationBeanPostProcessor
that indicates the proper
RabbitAdmin bean to be used when processing to the listeners, and also associates it to the
declarables (Exchanges, Queues, and Bindings) returned.
This processing restricts the RabbitAdmin
according to the related
configuration, preventing the server from automatic binding non-related structures.
- Since:
- 2.3
- Author:
- Wander Costa
-
Field Summary
Fields inherited from class org.springframework.amqp.rabbit.annotation.RabbitListenerAnnotationBeanPostProcessor
DEFAULT_RABBIT_LISTENER_CONTAINER_FACTORY_BEAN_NAME, RABBIT_EMPTY_STRING_ARGUMENTS_PROPERTY
Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected Collection<Declarable>
processAmqpListener
(RabbitListener rabbitListener, Method method, Object bean, String beanName) protected String
resolveMultiRabbitAdminName
(RabbitListener rabbitListener) Resolves the name of the RabbitAdmin bean based on the RabbitListener, or falls back to the default RabbitAdmin name provided by MultiRabbit.Methods inherited from class org.springframework.amqp.rabbit.annotation.RabbitListenerAnnotationBeanPostProcessor
afterSingletonsInstantiated, assertBeanFactory, getOrder, noBeanFoundMessage, postProcessAfterInitialization, postProcessBeforeInitialization, processListener, resolveExpressionAsString, setBeanClassLoader, setBeanFactory, setCharset, setContainerFactoryBeanName, setEndpointRegistry, setEnvironment, setMessageHandlerMethodFactory
-
Constructor Details
-
MultiRabbitListenerAnnotationBeanPostProcessor
public MultiRabbitListenerAnnotationBeanPostProcessor()
-
-
Method Details
-
processAmqpListener
protected Collection<Declarable> processAmqpListener(RabbitListener rabbitListener, Method method, Object bean, String beanName) - Overrides:
processAmqpListener
in classRabbitListenerAnnotationBeanPostProcessor
-
resolveMultiRabbitAdminName
Resolves the name of the RabbitAdmin bean based on the RabbitListener, or falls back to the default RabbitAdmin name provided by MultiRabbit.- Parameters:
rabbitListener
- The RabbitListener to process the name from.- Returns:
- The name of the RabbitAdmin bean.
-