Kafka - Topics and PartitionsA Kafka topic has retention.ms set to 86400000 (1 day), but messages are deleted after 12 hours. What is the likely cause?AThe retention.ms value is ignored by KafkaBretention.bytes is set and size limit reached before 1 dayCThe topic has cleanup.policy set to compactDThe broker is misconfigured and deletes earlyCheck Answer
Step-by-Step SolutionSolution:Step 1: Understand retention.ms and retention.bytes interactionKafka deletes messages when either time or size limit is reached.Step 2: Reason why messages deleted earlyIf messages are deleted before 1 day, likely size limit (retention.bytes) was reached first.Final Answer:retention.bytes is set and size limit reached before 1 day -> Option BQuick Check:Size limit can override time limit [OK]Quick Trick: Size limit can cause earlier deletion than time limit [OK]Common Mistakes:Assuming retention.ms is ignoredConfusing cleanup.policy with retentionBlaming broker misconfiguration without evidence
Master "Topics and Partitions" in Kafka9 interactive learning modes - each teaches the same concept differentlyLearnWhyDeepVisualTryChallengeProjectRecallTime
More Kafka Quizzes Consumers - Auto-commit vs manual commit - Quiz 7medium Kafka Basics and Event Streaming - Kafka installation and setup - Quiz 8hard Kafka Cluster Architecture - Controller broker - Quiz 7medium Producers - Producer retries and idempotency - Quiz 10hard Producers - Acknowledgment modes (acks=0, 1, all) - Quiz 2easy Producers - Producer retries and idempotency - Quiz 11easy Topics and Partitions - Topic creation - Quiz 5medium Topics and Partitions - Topic deletion and cleanup - Quiz 7medium Topics and Partitions - Partition ordering guarantees - Quiz 3easy Topics and Partitions - Topic deletion and cleanup - Quiz 10hard