Question 3 of 50
Is Kafka a queue?
Question
"Is Kafka basically a message queue, just faster?"
What the interviewer wants to assess
This is essentially a shallowness test. Whoever answers "yes, more or less" usually hasn't internalized the difference between distributing work and sharing facts — and that distinction resurfaces in nearly every following question in the interview.
Resposta rápida
Not structurally. A traditional queue removes the message after it's processed — it exists to be delivered to a single consumer and disappear. In Kafka, the event stays in the log after being read, until it expires under the retention policy, which lets multiple independent consumers read the same data and reprocess history when needed.
Resposta nível Sênior
Technically you can use Kafka as a queue — a Consumer Group already distributes partitions among workers, similar to what a queue does. But reducing Kafka to that ignores the more important half of its design: the same event can be read by multiple completely independent Consumer Groups, without duplicating the message, and each group keeps its own read position. On top of that, the message doesn't disappear once consumed — it stays in the log until retention expires it, which enables replay: reprocessing a range of events to fix a bug or populate a new system. A classic queue (RabbitMQ, SQS) has no native equivalent to this.
In-depth explanation
See "Kafka is not just a queue" in Chapter 1, and the full comparison with other tools in Chapter 2.
Exemplo financeiro
The FaturaFechada (statement closed) event can be read by the billing service (which generates the
invoice) and, months later, by a new analytics service that needs to rebuild the last 90 days of
statement history — just by setting up a new Consumer Group and resetting the offset to the start of
retention. In a traditional queue, that history would already have been discarded.
"Yes, it is a faster, more scalable queue"
This only describes the throughput angle, ignoring retention, multiple independent consumers, and replay — which are the differences that actually matter in a technical interview.
Pode vir a seguir
Likely follow-up: "so when would you use a queue instead of Kafka?" and "how does Kafka manage to reread already-consumed messages?".
Related chapters