Routing messages with Spring Cloud Stream and RabbitMQ
We decided to utilize the match events generated in the previous recipe to update the football match score. We’ll create a new application that subscribes to the goal events to implement this functionality.
In this recipe, we’ll learn how to configure our Spring Cloud Stream producer application to set the routing key based on the message headers. Then, we’ll learn how to configure the consumer applications to set up the queue bindings based on pattern matches for the routing key.
Getting ready
This recipe starts with the outcome of the Event-driven applications with Spring Cloud Stream and RabbitMQ recipe. I prepared a working version in case you haven’t yet completed that recipe. You can find it in the book’s GitHub repository at https://github.com/PacktPublishing/Spring-Boot-3.0-Cookbook, in the chapter8/recipe8-6/start
folder.
As in the Event-driven applications with Spring Cloud...