@ Bean @ ConditionalOnMissingBean ( name = "listenerContainerFactory" ) public RabbitListenerContainerFactory < SimpleMessageListenerContainer > listenerContainerFactory ( final SimpleRabbitListenerContainerFactoryConfigurer configurer , final ErrorHandler errorHandler ) { final ConfigurableRabbitListenerContainerFactory factory = new ConfigurableRabbitListenerContainerFactory ( amqpProperties . isMissingQueuesFatal ( ) , amqpProperties . getDeclarationRetries ( ) , errorHandler ) ; configurer . configure ( factory , rabbitConnectionFactory ) ; return factory ; }
Create RabbitListenerContainerFactory bean if no listenerContainerFactory bean found