use of org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer in project tutorials by eugenp.
the class SpringAmqpConfig method container.
@Bean
SimpleMessageListenerContainer container(ConnectionFactory connectionFactory, MessageListenerAdapter listenerAdapter) {
SimpleMessageListenerContainer container = new SimpleMessageListenerContainer();
container.setConnectionFactory(connectionFactory);
container.setQueueNames(queueName);
container.setMessageListener(listenerAdapter);
return container;
}
use of org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer in project tutorials by eugenp.
the class AmqpServer method listener.
@Bean
SimpleMessageListenerContainer listener(ConnectionFactory factory, AmqpInvokerServiceExporter exporter, Queue queue) {
SimpleMessageListenerContainer container = new SimpleMessageListenerContainer(factory);
container.setMessageListener(exporter);
container.setQueueNames(queue.getName());
return container;
}
Aggregations