I am using Spring boot 2.2.9.RELEASE and Spring Cloud Hoxton.SR7. I am using Spring Cloud Bus to signal all my containers in a docker swarm stack and when deployed in production with a running RabbitMQ cluster things work perfectly!
I am using the RabbitMQ implementation via the spring-cloud-starter-bus-amqp Spring Boot starter. We occasionally run tests without needing the bus. There is a spring boot flag for this:
spring.cloud.bus.enabled=false
this disables the bus, but rabbitMQ still starts, and spits out connection refused errors. I had to also add:
rabbitmq.autoStarting=false
I tried fussing around with disabling RabbitMQ's auto configuration, but it seems there is a RabbitAutoConfiguration class that implies it is a SB autoconfig class, but in actual fact it is a normal SB config class.
Is there a cleaner way to disable the Cloud Bus that also prevents RabbitMQ from starting?