--- # The name of your project title: Spring Cloud Stream badges: # Specify your project's twitter handle, if any. Delete if none. twitter: SpringCloudOSS # Customize your project's badges. Delete any entries that do not apply. custom: - name: Source (GitHub) url: https://github.com/spring-cloud/spring-cloud-stream icon: github - name: Issues (Waffle) url: https://waffle.io/spring-cloud/spring-cloud-stream icon: tracking - name: CI (Jenkins) url: https://jenkins.spring.io/view/SpringCloudStream/view/CI/ icon: ci - name: StackOverflow url: http://stackoverflow.com/questions/tagged/spring-cloud-stream icon: stackoverflow --- {% capture parent_link %} [Spring Cloud]({{ site.projects_site_url }}/spring-cloud) {% endcapture %} {% capture billboard_description %} Spring Cloud Stream is a framework for building message-driven microservices. Spring Cloud Stream builds upon Spring Boot to create DevOps friendly microservice applications and Spring Integration to provide connectivity to message brokers. Spring Cloud Stream provides an opinionated configuration of message brokers, introducing the concepts of persistent pub/sub semantics, consumer groups and partitions across several middleware vendors. This opinionated configuration provides the basis to create stream processing applications. By adding `@EnableBinding` to your main application, you get immediate connectivity to a message broker and by adding `@StreamListener` to a method, you will receive events for stream processing. {% endcapture %} {% capture main_content %} ## Quick Start {% include download_widget.md %} As long as Spring Cloud Stream and a Spring Cloud Stream Binder dependencies are on the classpath any Spring Boot application with `@EnableBinding` will bind to the external message broker (e.g. Rabbit MQ or Apache Kafka, depending on the binder-implementation of choice). Let's see it in action! Head over to http://start.spring.io and create a project with the 'Stream Kafka' dependency. Modify the main class as shown below: ```java @SpringBootApplication @EnableBinding(Source.class) public class StreamdemoApplication { public static void main(String[] args) { SpringApplication.run(StreamdemoApplication.class, args); } @Bean @InboundChannelAdapter(value = Source.OUTPUT) public MessageSource timerMessageSource() { return () -> new GenericMessage<>(new SimpleDateFormat().format(new Date())); } } ``` Make sure Kafka (0.10.1.x or later) is running when you run the application. You can use the `kafka-console-consumer.sh` utility provided by Kafka to monitor messages sent on the `output` topic. ## Kafka Client Compatibility Spring Cloud Stream's Kafka binder builds upon Spring Kafka and Spring Integration Kafka libraries. Specifically, Spring Kafka is the core to this foundation, and it is based on the pure java `kafka-clients` jar. The following is the compatibility matrix of Spring cloud Stream and its dependent projects:
Spring Cloud Stream Version Spring for Apache Kafka Version Spring Integration for Apache Kafka Version kafka-clients Version
2.0.x 2.1.x, 2.0.x 3.0.x 1.0.x, 0.11.0.x
1.3.x 1.3.x, 1.2.x, 1.1.x 2.3.x, 2.2.x, 2.1.x 1.0.x*, 0.11.0.x*, 0.10.2.x
1.2.x 1.2.x, 1.1.x 2.2.x, 2.1.x 0.10.1.x
Depending on the selected release-combination, the dependent projects will be referenced transitively when using maven or gradle for version management.

* To use the 0.11.x.x or 1.x.x `kafka-clients` with 1.3.x, you must use the `spring-cloud-stream-binder-kafka11` jar (instead of `spring-cloud-stream-binder-kafka`). You must also override certain other jar versions as follows:
spring-cloud-stream-binder-kafka11 1.3.0.RELEASE or higher
spring-kafka 1.3.2.RELEASE or higher
spring-integration-kafka 2.3.0.RELEASE or higher
kafka_2.11 (same version as kafka-clients)