Transactional Outbox Pattern
To atomically update the database and publish an event, the service writes the event to an outbox table inside the same local transaction, and a separate relay (polling or change-data-capture) publishes it to the broker. This removes the dual-write race where the commit succeeds but the publish is lost.
This Concept is waiting for its first lesson!
To atomically update the database and publish an event, the service writes the event to an outbox table inside the same local transaction, and a separate relay (polling or change-data-capture) publishes it to the broker. This removes the dual-write race where the commit succeeds but the publish is lost.
Are you a teacher? Sign in to start contributing.
Sign In