undefined## Customizing the AMQP ConnectionFactory {#customizing-the-amqp-connectionfactory}
If you are using AMQP there needs to be a ConnectionFactory
(from Spring Rabbit) in the application context. If there is a single ConnectionFactory
it will be used, or if there is a one qualified as @HystrixConnectionFactory
(on the client) and @TurbineConnectionFactory
(on the server) it will be preferred over others, otherwise the @Primary
one will be used. If there are multiple unqualified connection factories there will be an error.
Note that Spring Boot (as of 1.2.2) creates a ConnectionFactory
that is not @Primary
, so if you want to use one connection factory for the bus and another for business messages, you need to create both, and annotate them @*ConnectionFactory
and @Primary
respectively.