liveBook · Manning

Chapter 10: When hexagons talk: Integration modes and the external architecture

What you will learn in chapter 10 of Clean Applications with Hexagonal Architecture

This introduction frames external integration as a set of boundary decisions that teams must make explicitly, whether designing a new hexagon or examining an existing system.

After this chapter you will be able to

What it builds on

Section by section

Introduction

This introduction frames external integration as a set of boundary decisions that teams must make explicitly, whether designing a new hexagon or examining an existing system.

Key terms: boundary, domain, contract map, interaction’s mode, use case, integration, external contract, ownership, new hexagon, legacy system

10.1 Two directions at one boundary

This section shows how to identify who starts each WriteFlow integration and use that direction to locate the adapter, name the external actor’s role, and assign response and failure responsibilities.

Key terms: inbound integration, outbound integration, input adapter, output adapter, driving actor, driven actor, interaction, synchronous interactions, timeout, retries

10.2 What crosses the boundary: Requests and facts

The section distinguishes requests from facts in WriteFlow’s external messages, then explains why message meaning and integration mode are separate decisions.

Key terms: request, fact, handler, output port, output adapter, input adapter, command, query, event, integration event

10.3 The three integration modes

Introduces three ways systems communicate across a boundary, distinguished by who waits and who continues the work.

Key terms: synchronous call, event, external orchestration, coordinator

10.3.1 Synchronous calls

This section explains how synchronous calls cross WriteFlow’s boundary, when their wait is necessary, and what that wait costs.

Key terms: synchronous call, input adapter, output port, output adapter, handler, CMS, WriteFlow’s decision, synchronous, asynchronous request flow, coupling in time

10.3.2 Event-driven integration

Event-driven integration publishes facts across a hexagon’s boundary, allowing independent reactions while accepting delayed and potentially repeated delivery.

Key terms: integration event, output adapter, input adapter, use case invocation, outbox, durable record, same transaction, state change, subscribers, eventually consistent

10.3.3 Orchestrated integration

This section explains when a sequence must move beyond a single hexagon into durable external orchestration, and how the coordinator works with the hexagon.

Key terms: internal orchestration, external orchestration, handler, external coordinator, two-phase commit, eventual consistency, local transactions, compensating action, saga, driving actor

10.4 Choosing a mode

This section explains how to choose an integration mode for each boundary-crossing interaction based on when an answer is needed and whether a process needs durable coordination.

Key terms: request, fact, synchronous call, event, internal orchestration, external orchestration, handler, coordinator, per interaction, WriteFlow

10.5 The rules that survive every mode

The section assigns boundary decisions to the domain, application layer, and adapters regardless of integration mode, and explains how a correlation ID can cross without exposing its contents to the core.

Key terms: domain, invariants, use case, Either, application layer, domain event, integration event, adapter, retries, timeouts

10.6 An example of external architecture for WriteFlow

This section turns WriteFlow’s external interactions into a contract map that shows how it communicates with neighbors and who owns each contract.

Key terms: external architecture, contract map, direction, request, fact, mode, owned contracts, consumed contracts, adapter, ArticleApproved

10.7 Summary

Where this is used later

Concepts explained in this chapter

← Chapter 9: Building WriteFlow: The complete implementation Chapter 11: Synchronous boundaries: Anti-corruption layers and distributed read models →

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.