Spring Cloud Stream architecture

The following figure shows an architecture of a typical Spring Cloud Stream microservice. A source would only have an input channel, the processor would have both the input and output channel, and a sink would have only an output channel:

Applications declare what kind of connection they would want--an input and/or an output. Spring Cloud Stream will establish all that would be needed to connect applications over the message broker.

Spring Cloud Stream would do the following:

  • Inject the input and/or output channels into the application
  • Establish connections with the message broker through a message=broker-specific binder
Binders bring configurability to Spring Cloud Stream applications. A String Cloud Stream application only declares the channels. Deployment team can configure, at runtime, which message broker (Kafka or RabbitMQ) the channels connect to. Spring Cloud Stream uses auto-configuration to detect the binder available on the classpath. To connect to a different message broker, all that we need to do is change the dependency for the project. Another option is to include multiple binders in the classpath and choose the one to use at runtime.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset