Kafka - Monitoring and OperationsYou want to compact a topic but keep deleted keys for 7 days before removal. Which configuration combination achieves this?Acleanup.policy=compact, delete, retention.ms=604800000Bcleanup.policy=compact, retention.ms=0Ccleanup.policy=delete, retention.ms=604800000Dcleanup.policy=compact onlyCheck Answer
Step-by-Step SolutionSolution:Step 1: Understand combined cleanup policiesSetting cleanup.policy=compact,delete enables both compaction and time-based deletion.Step 2: Use retention.ms for 7 daysRetention.ms=604800000 (7 days in ms) keeps deleted keys for that time before removal.Final Answer:cleanup.policy=compact, delete, retention.ms=604800000 -> Option AQuick Check:Combine compact and delete with retention.ms for delayed deletion [OK]Quick Trick: Use cleanup.policy=compact,delete plus retention.ms for delayed deletes [OK]Common Mistakes:MISTAKESUsing only compact disables time-based deletionSetting retention.ms=0 deletes immediatelyUsing delete policy alone disables compaction
Master "Monitoring and Operations" in Kafka9 interactive learning modes - each teaches the same concept differentlyLearnWhyDeepVisualTryChallengeProjectRecallTime
More Kafka Quizzes Kafka Connect - Kafka Connect architecture - Quiz 10hard Kafka Connect - Common connectors (JDBC, S3, Elasticsearch) - Quiz 3easy Kafka Streams - Filter and map operations - Quiz 2easy Kafka Streams - GroupBy and aggregation - Quiz 10hard Kafka with Java/Python - Why SDK integration enables applications - Quiz 15hard Monitoring and Operations - Key broker metrics - Quiz 13medium Monitoring and Operations - Prometheus and Grafana integration - Quiz 12easy Schema Registry - Schema evolution (backward, forward, full) - Quiz 3easy Schema Registry - Why schema management prevents data issues - Quiz 11easy Schema Registry - Schema evolution (backward, forward, full) - Quiz 11easy