Spring AMQP: Creating multiple queues dynamically
问题 I have a Spring @Configuration class that creates and registers RabbitMQ queues as follows: @Amqp @Configuration public class AmqpConfiguration { @Bean ConnectionFactory connectionFactory() { CachingConnectionFactory connectionFactory = new CachingConnectionFactory(HOST); connectionFactory.setUsername(USERNAME); connectionFactory.setPassword(PASSWORD); connectionFactory.addConnectionListener(brokerListener); return connectionFactory; } @Bean SimpleMessageListenerContainer