@Configuration
@ConditionalOnClass(value=org.springframework.amqp.core.AmqpTemplate.class)
public class TurbineAmqpAutoConfiguration
extends Object
Autoconfiguration for a Spring Cloud Turbine on AMQP. Enabled by default if
spring-rabbit is on the classpath, and can be switched off with
spring.cloud.bus.amqp.enabled
. If there is a single
ConnectionFactory
in the context it will be used, or if there is a one
qualified as @TurbineConnectionFactory
it will be preferred over others,
otherwise the @Primary
one will be used. If there are multiple unqualified
connection factories there will be an autowiring 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 @TurbineConnectionFactory
and
@Primary
respectively.
- Author:
- Spencer Gibb, Dave Syer