Transactional Outbox: The Hidden Failure Between Save and Publish
Crossing Boundaries with Integration Events

In Domain-Driven Design, integration events let bounded contexts communicate asynchronously, but designing them is tricky: don't publish your domain model, name events as business facts, and avoid exposing internal state changes. This article from Denis Kyashif's DDD series explores the pitfalls of event-driven integrations, from contract design to reliable delivery. It explains why data events aren't integration contracts, how to handle consumers needing more data, and the critical transactional outbox pattern—committing the order and the intent to publish in one database transaction to prevent lost messages. It also covers at-least-once delivery and idempotent processing to handle duplicate messages.
The order and its publication intent now commit or roll back together.