liveBook · Manning

RabbitMQ

As explained in Quarkus in Action

RabbitMQ is an open-source message broker that routes and delivers messages between applications.

RabbitMQ is an open-source message broker for routing and delivering messages between applications. In microservices, it supports asynchronous communication without blocking threads or tightly coupling services. section 9.0 section 9.7

RabbitMQ sends and consumes messages through queues, supports multiple messaging protocols and streams, and uses AMQP 0-9-1 by default. AMQP 1.0 requires a separate plugin and connector. section 9.7

Connect RabbitMQ to a Quarkus application through SmallRye Reactive Messaging:

  • Add the connector with quarkus ext add quarkus-messaging-rabbitmq. section 9.7
  • Use the same reactive messaging channel model as Kafka, including emitters and incoming consumers. section 9.0 section 9.7
  • Map channels to RabbitMQ exchanges and queues through configuration such as mp.messaging.incoming.invoices-rabbitmq.queue.name=invoices. section 9.7
  • Consume messages with @Incoming and deserialize received JSON into application objects when required. section 9.7

Asynchronous car-rental billing

A Reservation service emits an invoice when a reservation is created. A Billing service receives it through the invoices-rabbitmq channel, maps the JSON payload to an Invoice, and processes it without making the reservation flow synchronous. section 9.1 section 9.7

Figure 9.1 The car rental architecture changes incorporating reactive messaging channels
figure

Trace how reactive messaging channels connect the Reservation and Billing services in the expanded car-rental architecture. section 9.1

How Quarkus in Action covers it

How deep it goes
Explains protocols, queues, connectors, channel mappings, configuration, and consumption, but does not develop broker internals.
Examples
Uses invoice messages, Reservation and Billing services, RabbitMQ exchanges, queues, channels, and JSON payloads.
What it assumes
Assumes familiarity with Quarkus messaging channels and introduces RabbitMQ broker concepts and connector configuration.
What you can do after
Apply it via the Quarkus RabbitMQ connector to produce and consume asynchronous application messages.
How it connects
Links RabbitMQ with Quarkus, MicroProfile Reactive Messaging, SmallRye Reactive Messaging, AMQP, Kafka, and Reactive Streams.

Also explained in

Compare how 5 books explain RabbitMQ →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Quarkus in Action. The section links point to the parts of the book it draws on.