Dissecting the External Service Gateway pattern
In Chapter 2, Defining Boundaries and Letting Go, we did some event storming to identify a system's domain events, human actors, and external system actors. We also divided the system into autonomous subsystems, and we treated each sister subsystem as an external system.
For each external system, we create at least one ESG service in the appropriate subsystem. We need to identify whether events will flow in from the external system, flow out to the external system, or both. We also need to determine which domain events the ESG services will consume and produce.
From here, we need to understand the options for connecting to the external system, define the semantic maps between the external and internal domain entities, establish whether we are aiming to invoke an action or elicit a reaction, implement the ingress and/or egress pipelines, and decide how to package the service.
Connectivity
How we connect to an external...