Bird
0
0

Why might setting only a size-based retention policy (retention.bytes) without a time-based policy (retention.ms) be risky in Kafka?

hard📝 Conceptual Q10 of 15
Kafka - Topics and Partitions
Why might setting only a size-based retention policy (retention.bytes) without a time-based policy (retention.ms) be risky in Kafka?
AOld messages might be kept indefinitely if size limit is not reached
BKafka will delete messages immediately regardless of size
CKafka disables topic compaction automatically
DRetention.bytes setting is ignored without retention.ms
Step-by-Step Solution
Solution:
  1. Step 1: Understand retention.bytes without retention.ms

    If only retention.bytes is set, messages are deleted only when size limit is reached.
  2. Step 2: Identify risk of old messages

    If size limit is never reached, old messages remain indefinitely, which may cause data staleness.
  3. Final Answer:

    Old messages might be kept indefinitely if size limit is not reached -> Option A
  4. Quick Check:

    Size-only retention risks indefinite message retention [OK]
Quick Trick: Size-only retention can keep old messages forever [OK]
Common Mistakes:
  • Assuming messages get deleted immediately
  • Believing retention.bytes is ignored without retention.ms
  • Confusing compaction with retention policies

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kafka Quizzes