The error says:
“Error invoking setter method, please report this at http://issues.axonframework.org”
That gets thrown from the setExclusive(boolean) method of DefaultRabbitMqStrategy, which is called from the createContainer(config) method of ListenerContainerFactory.
Looking in the function createContainer(config), I notice that this section:
if (config.getConcurrentConsumers() != null)
{
newContainer.setConcurrentConsumers(config.getConcurrentConsumers());
}
…comes before this section:
if (config.getExclusive() != null)
{
rabbitMqStrategy.setExclusive(newContainer, config.getExclusive());
}
So, in effect the setExclusive() method is called AFTER the setConcurrentConsumers() method in Spring’s SimpleMessageListenerContainer. Looking at the code for that on Github, it seems like that order will always lead to an error when trying to set exclusive=false, because the Spring code expects one to call setExclusive(false) BEFORE calling setConcurrentConsumers(> 1).