Two writes, one of which will fail
Placing an order writes a row to the database and publishes an OrderPlaced event. Two separate systems, no transaction spanning them.
If the publish fails after the commit, the order exists and nothing downstream knows — no email, no fulfilment. If you publish first and the commit fails, you've announced an order that doesn't exist. There is no ordering of these two writes that is safe.
Boundaries, outermost first: One transaction: orders table, an empty slot for the same database Outside every boundary: Event bus (downstream; FAILED: never told), Order service, an empty slot for the reads the outbox Connections: Order service calls orders table — insert order (step 1) Order service calls same database — insert event · same commit (step 2) same database publishes to reads the outbox (step 3) reads the outbox publishes to Event bus — at least once (step 4)