Dave to avoid confusion I have begun using new exchange and new queue.
using the same configuration as before
<bean id="messageListenerContainer" class="org.springframework.amqp.rabbit.listener.Si mpleMessageListenerContainer">
<property name="connectionFactory" ref="connectionFactory" />
<property name="queueName" value="rabbitmq.test.queue"/>
<property name="concurrentConsumers" value="1" />
<property name="messageListener" ref="messageListenerAdapter" />
<property name="channelTransacted" value="true" />
<property name="acknowledgeMode" value="AUTO"/>
</bean>
In AbstractMDBRabbitConfiguration: tried with both SingleConnectionFactory and CachingConnectionFactory:
@Bean
public ConnectionFactory connectionFactory() {
//CachingConnectionFactory connectionFactory = new CachingConnectionFactory(rabbitMQHost);
SingleConnectionFactory connectionFactory = new SingleConnectionFactory(rabbitMQHost);
connectionFactory.setUsername(rabbitMQUser);
connectionFactory.setPassword(rabbitMQPassword);
//connectionFactory.setChannelCacheSize(1);
return connectionFactory;
}
Now messages are not at all saved to the disk/queue on failure of RabbitMQ broker.
Thanks
Venkat

