Search code examples
spring-cloudspring-cloud-streamspring-cloud-bus

Spring Cloud Bus with aws-kinesis


In the documentation of Spring Cloud Bus (https://github.com/spring-cloud/spring-cloud-bus) it was mentioned like

The Bus starters cover Rabbit and Kafka, because those are the two most common implementations, but Spring Cloud Stream is quite flexible and binder will work combined with spring-cloud-bus.

In my project we can not maintain an another infrastructure for Rabbit or Kafka hence I want to use spring-cloud-stream-binder-aws-kinesis (https://github.com/spring-cloud/spring-cloud-stream-binder-aws-kinesis) with spring-cloud-bus. Can anyone guide me how can I do that??


Solution

  • See https://github.com/spring-cloud/spring-cloud-bus/blob/master/spring-cloud-starter-bus-amqp/pom.xml:

    <dependencies>
            <dependency>
                <groupId>org.springframework.cloud</groupId>
                <artifactId>spring-cloud-starter-stream-rabbit</artifactId>
            </dependency>
            <dependency>
                <groupId>org.springframework.cloud</groupId>
                <artifactId>spring-cloud-bus</artifactId>
            </dependency>
    </dependencies>
    

    I guess the same way we can follow for Kinesis Binder:

    <dependencies>
            <dependency>
                <groupId>org.springframework.cloud</groupId>
                <artifactId>spring-cloud-stream-binder-kinesis</artifactId>
                <version>1.1.0.RELEASE</version>
            </dependency>
            <dependency>
                <groupId>org.springframework.cloud</groupId>
                <artifactId>spring-cloud-bus</artifactId>
            </dependency>
    </dependencies>