All Questions
Multi Step Processes medium

You need to save a User to the database AND send a 'UserCreated' event to a message queue. If you do these as two separate steps in your code, one might succeed while the other fails. What pattern best solves this atomicity issue?

  1. A The Transactional Outbox Pattern
  2. B Two-Phase Commit (2PC)
  3. C Write-Behind Caching
  4. D Retry-After Header

One system design question a day, with spaced repetition so the ones you miss come back.

Get the app

Related questions