Bird
Raised Fist0

Which configuration enables log compaction on a Kafka topic?

easy📝 Syntax Q12 of Q15
Kafka - Monitoring and Operations
Which configuration enables log compaction on a Kafka topic?
Acleanup.policy=delete
Bcleanup.policy=compact
Clog.compaction.enabled=true
Dretention.ms=0
Step-by-Step Solution
Solution:
  1. Step 1: Identify correct cleanup policy

    Log compaction is enabled by setting cleanup.policy=compact on the topic.
  2. Step 2: Eliminate incorrect options

    cleanup.policy=delete is default retention, log.compaction.enabled is invalid, retention.ms controls time retention.
  3. Final Answer:

    cleanup.policy=compact -> Option B
  4. Quick Check:

    Enable compaction with cleanup.policy=compact [OK]
Quick Trick: Remember: compact, not delete, enables log compaction [OK]
Common Mistakes:
MISTAKES
  • Using cleanup.policy=delete instead of compact
  • Assuming a separate 'log.compaction.enabled' setting exists
  • Confusing retention.ms with compaction setting

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kafka Quizzes