Bird
0
0

What happens to messages in a Kafka topic if the retention period expires?

medium📝 Predict Output Q5 of 15
Kafka - Topics and Partitions
What happens to messages in a Kafka topic if the retention period expires?
AMessages are deleted from the topic
BMessages are moved to a backup topic
CMessages are encrypted automatically
DMessages are sent back to the producer
Step-by-Step Solution
Solution:
  1. Step 1: Understand Kafka retention policy

    Kafka deletes messages from topics after the retention period expires to free storage.
  2. Step 2: Eliminate incorrect options

    Messages are not moved, encrypted, or sent back to producers automatically.
  3. Final Answer:

    Messages are deleted from the topic -> Option A
  4. Quick Check:

    Retention expiry = Messages deleted [OK]
Quick Trick: Expired retention means message deletion [OK]
Common Mistakes:
  • Thinking messages move to backup
  • Assuming automatic encryption
  • Believing messages return to producer

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kafka Quizzes