Bird
Raised Fist0

Which Kafka topic setting must be configured to activate log compaction?

easy🧠 Conceptual Q2 of Q15
Kafka - Monitoring and Operations
Which Kafka topic setting must be configured to activate log compaction?
Amin.insync.replicas=2
Blog.retention.hours=24
Csegment.bytes=1073741824
Dcleanup.policy=compact
Step-by-Step Solution
Solution:
  1. Step 1: Identify log compaction configuration

    Log compaction is controlled by the topic configuration cleanup.policy.
  2. Step 2: Understand the value for compaction

    Setting cleanup.policy=compact enables log compaction on the topic.
  3. Step 3: Verify other options

    Other options like log.retention.hours or segment.bytes relate to retention and segment size, not compaction.
  4. Final Answer:

    cleanup.policy=compact -> Option D
  5. Quick Check:

    Compaction enabled by cleanup.policy=compact [OK]
Quick Trick: Set cleanup.policy=compact to enable log compaction [OK]
Common Mistakes:
MISTAKES
  • Confusing retention settings with compaction
  • Using segment size configurations to enable compaction
  • Assuming replication settings control compaction

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kafka Quizzes