Getting stocked while doing with RabbitMQ using Spring-AMQP.
Just need to get a way to configure AutomaticRecoveryEnabled and NetworkRecoveryInterval using Spring-AMQP. There is a direct option to set these flages if you you developing using native RabbitMQ library. But i didn't find a workaround to do the same using spring
Using RabbitMQ Native library(don't need any help)
factory.setAutomaticRecoveryEnabled(true);
factory.setNetworkRecoveryInterval(10000);
Using Spring-AMPQ(need help)
Like above i didn't find any such method while trying with Spring-AMPQ. This is what i am doing now.
@Bean(name="listener")
public SimpleMessageListenerContainer listenerContainer()
{
SimpleMessageListenerContainer container = new SimpleMessageListenerContainer();
container.setConnectionFactory(connectionFactory());
container.setQueueNames(env.getProperty("mb.queue"));
container.setMessageListener(new MessageListenerAdapter(messageListener));
return container;
}
Any help in this regards is highly appreciable. Thanks in advance.