Bird
0
0

You want to automate cleanup of unused topics older than 30 days. Which approach best uses Kafka's topic deletion and cleanup features?

hard📝 Application Q15 of 15
Kafka - Topics and Partitions
You want to automate cleanup of unused topics older than 30 days. Which approach best uses Kafka's topic deletion and cleanup features?
AEnable <code>delete.topic.enable=true</code> and run a script that lists topics, checks their creation date, and deletes old ones
BSet <code>log.retention.ms</code> to 30 days and rely on Kafka to delete topics automatically
CManually delete topics from Kafka config files after 30 days
DDisable topic deletion and archive topics instead
Step-by-Step Solution
Solution:
  1. Step 1: Understand Kafka's automatic cleanup capabilities

    Kafka deletes old log segments inside topics but does not delete entire topics automatically based on age.
  2. Step 2: Choose an automation method for topic deletion

    Enabling delete.topic.enable=true and scripting topic listing with date checks allows controlled deletion of old topics.
  3. Final Answer:

    Enable delete.topic.enable=true and run a script that lists topics, checks their creation date, and deletes old ones -> Option A
  4. Quick Check:

    Automate deletion with config + script, not just retention settings [OK]
Quick Trick: Use delete.topic.enable plus scripts for automated topic cleanup [OK]
Common Mistakes:
  • Expecting Kafka to delete topics automatically by age
  • Editing config files manually for topic deletion
  • Disabling deletion and expecting cleanup

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kafka Quizzes