What is it
A technique to update a resource while ensuring an event is published atomically.
It works by committing a data change simultaneously with inserting an event in an outbox table, both within the same transaction. Another part of the system is responsible for publishing these events, and remove them from the table after it has successfully published them.
Why we use it
To guarantee data correctness. If a resource is updated, an event is guaranteed to be published at-least-once eventually.