Kafka - Topics and PartitionsWhy might setting only a size-based retention policy (retention.bytes) without a time-based policy (retention.ms) be risky in Kafka?AOld messages might be kept indefinitely if size limit is not reachedBKafka will delete messages immediately regardless of sizeCKafka disables topic compaction automaticallyDRetention.bytes setting is ignored without retention.msCheck Answer
Step-by-Step SolutionSolution:Step 1: Understand retention.bytes without retention.msIf only retention.bytes is set, messages are deleted only when size limit is reached.Step 2: Identify risk of old messagesIf size limit is never reached, old messages remain indefinitely, which may cause data staleness.Final Answer:Old messages might be kept indefinitely if size limit is not reached -> Option AQuick Check:Size-only retention risks indefinite message retention [OK]Quick Trick: Size-only retention can keep old messages forever [OK]Common Mistakes:Assuming messages get deleted immediatelyBelieving retention.bytes is ignored without retention.msConfusing compaction with retention policies
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