All jobs / Backend developer / Distributed Systems

Backend developer interview question · 3–5 years

The interviewer asks: “How do you publish an event only if the order row actually committed?” Strongest answer?

The strongest answer

Transactional outbox: write the row and an outbox record in the same transaction; a publisher drains the outbox. No commit without the event, no event without the commit.

Why it works

Exactly. Dual-write (DB and broker as two commits) will desync. The outbox makes the event part of the same atomic unit; at-least-once drain + idempotent consumers finish the story.

What a good answer covers

Answers that fall short

Who gets asked this

More Distributed Systems questions