Explain it in 60 seconds
Kafka retention and log compaction
System Design · Messaging and Queues · Intermediate
What is the difference between time-based retention and log compaction in Kafka?
What a strong answer covers
Your AI report card counts how many of these ideas you cover.
- Retention: delete messages after time/size.
- Compaction: keep latest value per key.
- Compaction gives a changelog/snapshot.
- Tombstones delete keys.
- Use compaction for state topics.
Practise this topic
Start without signing up. Sign in free to get an AI report card on your answer.