Spring Cloud Bus

2.1.0 M1

Spring Cloud Bus links nodes of a distributed system with a lightweight message broker. This can then be used to broadcast state changes (e.g. configuration changes) or other management instructions. The only implementation currently is with an AMQP broker as the transport, but the same basic feature set (and some more depending on the transport) is on the roadmap for other transports.

Getting Started

As long as Spring Cloud Bus AMQP and RabbitMQ are on the classpath any Spring Boot application will try to contact a RabbitMQ server on localhost:5672 (the default value of spring.rabbitmq.addresses):

@Configuration
@EnableAutoConfiguration
@RestController
public class Application {

  @RequestMapping("/")
  public String home() {
    return "Hello World";
  }

  public static void main(String[] args) {
    SpringApplication.run(Application.class, args);
  }

}

Quick start

Bootstrap your application with Spring Initializr.

Documentation

Each Spring project has its own; it explains in great details how you can use project features and what you can achieve with them.
2.1.0 M1 PRE CURRENT Reference Doc. API Doc.
2.0.1 SNAPSHOT CURRENT Reference Doc. API Doc.
2.0.0 CURRENT GA Reference Doc. API Doc.
1.3.5 SNAPSHOT CURRENT Reference Doc. API Doc.
1.3.4 GA Reference Doc. API Doc.
1.2.1 GA Reference Doc. API Doc.
1.1.1 GA Reference Doc. API Doc.
1.0.3 GA Reference Doc. API Doc.

A few examples to try out: