All jobs / Backend developer / Distributed Systems

Backend developer interview question · 1–3 years

The interviewer asks: “Your queue consumer ran twice for the same message. What do you do?” Strongest answer?

The strongest answer

Assume at-least-once. Make the handler idempotent — unique key, upsert, or a processed-message table — then ack. Don't assume the broker delivered once.

Why it works

Exactly. Duplicates are normal (timeouts, rebalances). Idempotency is the consumer's job.

What a good answer covers

Answers that fall short

Who gets asked this

More Distributed Systems questions