Bird
Raised Fist0

What does log compaction in Kafka primarily help with?

easy🧠 Conceptual Q1 of Q15
Kafka - Monitoring and Operations
What does log compaction in Kafka primarily help with?
AKeeping only the latest value for each key in a topic
BDeleting all messages older than a certain time
CCompressing messages to reduce disk space
DEncrypting messages for security
Step-by-Step Solution
Solution:
  1. Step 1: Understand log compaction purpose

    Log compaction keeps the latest record for each key, removing older duplicates.
  2. Step 2: Compare options

    Deleting old messages is log retention, compression reduces size but not key-based, encryption is unrelated.
  3. Final Answer:

    Keeping only the latest value for each key in a topic -> Option A
  4. Quick Check:

    Log compaction purpose = Keep latest key value [OK]
Quick Trick: Log compaction keeps latest key records only [OK]
Common Mistakes:
MISTAKES
  • Confusing log compaction with time-based retention
  • Thinking compression is the same as compaction
  • Assuming compaction encrypts data

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kafka Quizzes