liveBook · Manning

Message broker

As explained in Microservices Patterns, Second Edition

A message broker is middleware that receives, routes, and delivers messages between communicating applications.

A message broker is an infrastructure service that receives messages from senders, stores them, and eventually delivers them to receivers. It typically implements a message channel, an abstraction of the messaging technology. section 8.3.1

Choose the channel type to match the interaction: point-to-point delivers each message to one consumer, while publish-subscribe delivers it to all subscribers. Commands commonly use point-to-point channels; events commonly use publish-subscribe channels. Brokers such as RabbitMQ, Apache Kafka, and AWS SQS make different trade-offs. section 8.3.1

Figure 8.12 The business logic in the sender invokes a sending port interface, which is implemented by the message sender’s adapter. The message sender sends a message to a receiver via a message channel. The message channel is an abstraction of messaging infrastructure. A message handler adapter in the receiver is invoked to handle the message. It invokes the receiving port interface implemented by the receiver’s business logic.
Messaging

Trace the message path from sender business logic, through an adapter and channel, to the receiver’s handler and business logic. section 8.3.1

How Microservices Patterns, Second Edition covers it

How deep it goes
Defines broker responsibilities and distinguishes channel delivery patterns without detailing broker internals.
Examples
Names RabbitMQ, Apache Kafka, and AWS SQS, and pairs commands with point-to-point channels and events with publish-subscribe.
What you can do after
Evaluate channel delivery patterns and recognize brokers used to implement them.
How it connects
Connects message brokers to message channels, command messages, events, point-to-point, and publish-subscribe.

Also explained in

Compare how 6 books explain message broker →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Microservices Patterns, Second Edition. The section links point to the parts of the book it draws on.