Exactly-once event publishing

DesignHard50 minStripe style

Your task

Design effectively-once event publishing from a service that also writes to its primary database. A user action must (a) commit a row to the DB and (b) publish an event to a stream, with the guarantee that the event is published if and only if the DB write committed, exactly once, even across crashes, retries, and broker failovers. Scale: 80K transactions/sec. Consumers downstream must also process each event effectively once.

It covers

  • Idempotency
  • Transactional outbox
  • Dedup