Kafka easy
Unlike traditional message queues, Kafka acts as a storage system. What determines how long a record stays in the cluster?
- A The record is deleted as soon as the first consumer in the group reads it.
- B Records are kept until the whole cluster is restarted.
- C A configurable retention policy (based on time, e.g., 7 days, or size, e.g., 100GB), regardless of consumer status.
- D Records are only kept if they are marked as 'Critical' by the producer.
Answer: C. A configurable retention policy (based on time, e.g., 7 days, or size, e.g., 100GB), regardless of consumer status.
This allows for 'Time Travel'—late-joining consumers or those needing to fix a bug can 'replay' the log from the past week. Kafka treats data as a persistent log, not a transient transient buffer.
One system design question a day, with spaced repetition so the ones you miss come back.
Get the appRelated questions
- When implementing 'Exactly-Once Semantics' (EOS) in a Kafka stream, what is the role of the `isolation.level=read_committed` setting on the Consumer?
- Historically, which external service was required by Kafka to manage cluster hierarchy, metadata, and leader election status?
- Once a message is successfully appended to a Kafka partition log, what is its mutability status?
- In a Kafka cluster, what is the role of a 'Broker'?
- What is the primary indicator of a bottleneck in a Kafka consumer's processing logic?
- What is the primary architectural role of Apache Kafka in a distributed system?