SpinTheMic
Pro

Interview practice question

Event published but database update rolled back

Backend Engineering · Microservices · Intermediate

Your service saves an order and publishes OrderCreated to Kafka. Sometimes consumers see events for orders that don't exist. Why, and how do you fix it?

What a strong answer covers

Your AI report card counts how many of these ideas you cover.

  • Dual write: publish succeeded, DB rolled back.
  • Or reverse: commit, publish fails.
  • Transactional outbox.
  • Relay or CDC publishes after commit.
  • Consumers idempotent.
Practise this topic

Start without signing up. Sign in free to get an AI report card on your answer.

See all topics