- Spring 5.0 By Example
- Claudio Eduardo de Oliveira
- 127字
- 2025-02-25 18:46:31
Spring Cloud Stream
The idea behind this module is to provide an easy way to build message-driven microservices. The module has an opinionated way of configuration. It means we need to follow some rules to create these configurations. In general, the application is configured by the yaml|properties file.
The module supports annotations as well. This means that a couple of annotations are enough to create consumers, producers, and bindings; it decouples the application and makes it easy to understand. It supplies some abstractions around the message brokers and channels, and it makes the developer's life more comfortable and productive as well.
Spring Cloud Stream has Binder implementations for RabbitMQ and Kafka.
Some common annotations are @EnableBinding, @Input, and @Output.