Interview Q&A · questions with model answers
Messaging & Queues Interview Questions
Part of the study plan for: Backend Engineer · Data Engineer · Site Reliability Engineer (SRE)
Ordered by how often they're asked. Most-asked answers are free to read in full; members see every answer and can rate their confidence on each.
-
Most asked Explain at-most-once, at-least-once and exactly-once delivery.
At-most-once may lose messages but never duplicates (ack before processing); at-least-once never loses messages but may deliver duplicates (ack after processing); exactly-once is achievable only…
-
Most asked How should retries and dead-letter queues work?
Retry transient failures with exponential backoff and jitter up to a limit; after max attempts, move the message to a dead-letter queue (DLQ) for inspection and replay instead of blocking the queue…
-
How do Kafka partitions and consumer groups work?
A topic is split into partitions; each partition is consumed by at most one consumer in a group, so a group's parallelism is limited by the partition count. Each group tracks its own offsets, so…
-
How does Kafka achieve exactly-once semantics?
Kafka combines idempotent producers (sequence numbers prevent duplicate writes on retry) with transactions that atomically write output records and commit consumer offsets, so a read-process-write…
-
How do you handle large payloads in messages?
Keep messages small (brokers have size limits and large messages hurt throughput): store large data in object storage and send a reference (claim-check pattern), or compress payloads.