I'm trying to configure a SimpleMessageListenerContainer from Spring AMQP with channeled transactions to dynamically add consumers on demand. The problem is, I don't see consumers being added dynamically when I have a channeled transaction. To be clear, this doesn't dynamically add consumers under load:
container.setMaxConcurrentConsumers(5);
container.setChannelTransacted(true);
container.setTransactionManager(rabbitTransactionManager);
But this does:
container.setMaxConcurrentConsumers(5);
//container.setChannelTransacted(true);
//container.setTransactionManager(rabbitTransactionManager);
My questions are:
It's a bug - please open a JIRA issue.
There is not a workaround, unfortunately; it needs a patch.
The use of transactions with RabbitMQ is quite rare, especially on the consumer side - can you explain why you need them?