Closed jammann closed 5 years ago
Hi, in my case, the project is not using this auto configuration to create the connection factory as there might be another connection factory present (e.g. ConditionalOnMissingBean(ConnectionFactory.class) = false) What would be a workaround for this?
We wanted to have both ActiveMQ and this Spring boot starter in our project. Default should be QPid, but if we activate a Spring profile "activemq", we explicitly create an ActiveMQ connection factory to use that. We would have expected that then this Autoconfigure does not create a second connectionFactory.
But this does not work, because the Autoconfigure misses something like the annotation
@ConditionalOnMissingBean(ConnectionFactory.class)
The ActiveMQ autoconfiguration has something like that, and hence is not creating a second connectionFactory if one already exists.
I think it would make sense to add such an annotation also for QPid