Before I ship any Kafka consumer that touches money, 💸 I ask 5 questions. 🤔

by Kaushal Bhatt
5 min read

I ask 5 questions. 🤔

I work on a crypto wallet backend, where a duplicate message can mean a duplicate transaction. 👛

This checklist has saved me more than once. ✅

What happens if this message arrives twice? 🔁

Use an idempotency key and check it before any state change 🔑

What happens if it arrives out of order? 🔀

Never assume order across partitions ⚠️

What happens if the downstream service is down? 📉

Retry with backoff and a hard limit ⏳

Where does a failed message go? 🧭

A DLQ with a named owner, not a dumping ground 🗂️

How will I know it failed? 🚨

Alert on DLQ depth and consumer lag, not just errors 📊

If you can't answer all 5, the consumer isn't ready for production. 🛑

Save this for your next design review. 💾

#Kafka #DistributedSystems #BackendEngineering