liveBook · Manning

Messaging

As explained in Microservices Patterns, Second Edition

An integration technique in which software components communicate by sending and receiving messages through a messaging system.

Messaging lets software components communicate by exchanging messages over channels. Sender and receiver business logic connect to the messaging infrastructure through ports and adapters. section 8.3.1

Messages have two parts:

  • A header holds name-value metadata, potentially including a unique message ID and return address. section 8.3.1
  • A body carries the data in text or binary form. Message kinds include documents, events, and commands. section 8.3.1

Domain event

An event can signal a change to a domain object, such as an Order or Customer. 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 how sender and receiver business logic connect to a channel through their ports and adapters. section 8.3.1

How Microservices Patterns, Second Edition covers it

How deep it goes
Explains message structure and traces sender, channel, adapter, and receiver responsibilities.
Examples
Uses an Order or Customer state change as an event example and diagrams sender-to-receiver flow.
What you can do after
Understand how components exchange messages through channels and adapter-connected business logic.
How it connects
Connects message channels and ports and adapters with domain events and RPC-style commands.

Also explained in

Compare how 2 books explain messaging →

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.