Interview practice question
Testing a message queue consumer
Backend Engineering · Testing · Intermediate
How would you test a service that consumes OrderPlaced events from Kafka and updates inventory?
What a strong answer covers
Your AI report card counts how many of these ideas you cover.
- Unit test handler logic directly.
- Integration test with real Kafka (Testcontainers).
- Test duplicates/idempotency.
- Test malformed messages → DLQ.
- Assert eventually with timeouts.
Practise this topic
Start without signing up. Sign in free to get an AI report card on your answer.