In the Implementing an inbound External Service Gateway recipe, we discussed how the ESG pattern provides an anti-corruption layer between the cloud-native system and its external dependencies. In this recipe, we will create an ESG service that allows events to flow outbound to an external service. The single responsibility of this service is to encapsulate the details of the external system. The service applies the CQRS pattern. The internal events are transformed to the external format and forwarded to the external system via its API.
Implementing an outbound External Service Gateway
Getting ready
Before starting this recipe, you will need an AWS Kinesis Stream, such as the one created in the Creating an event stream recipe...