Consuming the RabbitMQ queues reactively

Now, we will consume the RabbitMQ queues. The implementation is quite similar to what we have seen in the blocking implementation, and the names of the functions are similar as well.

We have consumed some RabbitMQ messages in the previous chapters, but this solution is quite different. Now, we will use the Reactive RabbitMQ implementation. The main idea here is to consume the stream of events; these events represent the messages that have arrived in the broker. These messages arrive and the Reactor RabbitMQ converts these messages to Flux, to enable us to consume in the reactive paradigm.

In the reactive paradigm, the representation of a stream of events (we can think of messages in the queue), is ...

Get Spring 5.0 By Example now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.