Bird
0
0

A Kafka topic has retention.ms set to 86400000 (1 day), but messages are deleted after 12 hours. What is the likely cause?

medium📝 Debug Q6 of 15
Kafka - Topics and Partitions
A Kafka topic has retention.ms set to 86400000 (1 day), but messages are deleted after 12 hours. What is the likely cause?
AThe retention.ms value is ignored by Kafka
Bretention.bytes is set and size limit reached before 1 day
CThe topic has cleanup.policy set to compact
DThe broker is misconfigured and deletes early
Step-by-Step Solution
Solution:
  1. Step 1: Understand retention.ms and retention.bytes interaction

    Kafka deletes messages when either time or size limit is reached.
  2. Step 2: Reason why messages deleted early

    If messages are deleted before 1 day, likely size limit (retention.bytes) was reached first.
  3. Final Answer:

    retention.bytes is set and size limit reached before 1 day -> Option B
  4. Quick Check:

    Size limit can override time limit [OK]
Quick Trick: Size limit can cause earlier deletion than time limit [OK]
Common Mistakes:
  • Assuming retention.ms is ignored
  • Confusing cleanup.policy with retention
  • Blaming broker misconfiguration without evidence

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kafka Quizzes