Event-driven applications with Spring Cloud Stream and RabbitMQ
We want to enhance the experience of our football application by using facts from a match, such as a goal or a red card. We can use the information to prepare a timeline with all events happening during the match or update the match score. We foresee that in the future, we can use this information for other features, such as preparing player statistics in real time or creating a player’s ranking using the statistics.
For this scenario, we can apply an event-driven architecture design. This type of design consists of detecting, processing, and reacting to real-time events as they happen. Usually, there are two types of components: the event producers and the event consumers, and they are loosely coupled. Spring Cloud Stream is the Spring project that supports event-driven applications that communicate using a shared messaging system, such as Kafka or RabbitMQ.
In this recipe, we’ll learn how to use Spring...