liveBook · Manning

Message broker

As explained in Platform Engineering on Kubernetes

A message broker is an intermediary service that receives, routes, and delivers messages between application components.

A message broker receives, routes, and delivers messages between application components. In asynchronous messaging, it decouples producers from consumers: a consumer can connect later, and services can isolate message flows through topics. section 7.1.4

Using a message broker introduces several implementation concerns:

  • Producers and consumers must know the broker location and how to publish or subscribe. section 7.1.4
  • Topics group messages so services sharing one broker can exchange different message streams. section 7.1.4
  • Applications require broker-specific client libraries, protocols, versions, credentials, and connection configuration. section 7.1.4

Kafka in a Kubernetes application

A Conference application runs Kafka alongside its services, Redis, and PostgreSQL in a Kubernetes cluster. The services use Kafka to exchange asynchronous messages, while pod readiness and restart behavior reveal whether dependencies such as Kafka are available. section 2.2.1

Figure 7.10 Asynchronous messaging interactions

Use the interaction diagram to trace a producer placing a message into the broker and a later consumer retrieving it. section 7.1.4

Figure 7.11 Dependencies and API challenges

Use the dependency diagram to inspect how Kafka client libraries and broker-specific APIs affect application services. section 7.1.4

How Platform Engineering on Kubernetes covers it

How deep it goes
Explains producer-consumer timing, topics, dependencies, protocols, client libraries, and configuration.
Examples
Uses Kafka in a Conference application deployed with Kubernetes, Redis, PostgreSQL, and multiple application services.
What it assumes
Assumes service-to-service communication knowledge and contrasts asynchronous messaging with HTTP and gRPC.
What you can do after
Apply it via Kafka to decouple services, isolate message groups with topics, and account for client dependencies and connection settings.
How it connects
Connects asynchronous messaging with HTTP, gRPC, topics, CloudEvents, Kafka clients, and Kubernetes services.

Also explained in

Compare how 3 books explain message broker →

Related concepts

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