Design a Java service that consumes events from Kafka, processes them in parallel, and writes the results to a database. How would you ensure performance, ordering, and no data loss?
~10 min by voice
How to approach it
This checks whether the candidate understands the real model of a Kafka consumer: a single-threaded client, ordering only within a partition, at-least-once and its consequences. And whether they can build a service from that which scales, doesn't lose or duplicate effects, and doesn't break on rebalances and poison messages.
The interviewer will ask this question and listen. Think out loud and ask for a hint if you need one. When you're done, pause or tap “That's my answer”. In about a minute, your score and the points you covered show up here.