Skip to Content
Building Resilient Distributed Systems
book

Building Resilient Distributed Systems

by Sam Newman
September 2026
Intermediate to advanced
390 pages
11h 2m
English
O'Reilly Media, Inc.
Content preview from Building Resilient Distributed Systems

Chapter 9. Message Brokers

Message brokers are often used in a distributed system, as they can help improve the reliability of communication between processes. That said, they aren’t a silver bullet for reliable communication. Understanding the basics of how brokers work can be very helpful in making sure you’re using them effectively. In addition to reviewing those basics, we’ll explore a few complementary patterns in this chapter that will further help improve the resiliency of your broker-based communication.

Message Broker Basics

A message broker is a software-based system that acts as an intermediary in interprocess communication. Rather than a client and server establishing direct communication—for example, via an HTTP connection—messages are sent to the broker, which in turn delivers them to the intended recipient.

Vendor terminology can vary, so I’ll use more generic terms here. In general, as shown in Figure 9-1, a broker sits between producers (which create messages) and consumers (which receive messages). These messages are routed via message channels.

The warehouse service acts as the producer, writing several messages to a message channel. These are then read by a Customer Notifications service which is acting as the consumer
Figure 9-1. Message broker core concepts

In general in this chapter, we’ll refer generically to the “message” as the thing that is created by a producer and then received by a consumer. A message, though, could contain many things. For example, a message could represent an event for event-driven interactions, but in ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Patterns of Distributed Systems

Patterns of Distributed Systems

Unmesh Joshi

Publisher Resources

ISBN: 9781098163532Errata Page