Kafka - Consumer GroupsIn a Kafka consumer group using cooperative rebalancing, what is the expected behavior when a consumer leaves?AOnly partitions assigned to the leaving consumer are revoked and reassigned.BAll partitions in the group are revoked and reassigned to remaining consumers.CThe group pauses consumption until a manual restart.DPartitions assigned to the leaving consumer remain unassigned.Check Answer
Step-by-Step SolutionSolution:Step 1: Analyze cooperative rebalancing on consumer leaveCooperative rebalancing revokes only the partitions of the leaving consumer and reassigns them incrementally.Step 2: Eliminate other optionsFull revocation is eager behavior; pausing or leaving partitions unassigned is incorrect.Final Answer:Only partitions assigned to the leaving consumer are revoked and reassigned. -> Option AQuick Check:Cooperative rebalance on leave = C [OK]Quick Trick: Cooperative rebalance revokes only leaving consumer's partitions [OK]Common Mistakes:Assuming full rebalance on consumer leaveThinking partitions remain unassignedBelieving group pauses consumption
Master "Consumer Groups" in Kafka9 interactive learning modes - each teaches the same concept differentlyLearnWhyDeepVisualTryChallengeProjectRecallTime
More Kafka Quizzes Consumers - Auto-commit vs manual commit - Quiz 12easy Kafka Basics and Event Streaming - Kafka CLI tools overview - Quiz 13medium Producers - Message key and value - Quiz 4medium Producers - Acknowledgment modes (acks=0, 1, all) - Quiz 7medium Producers - Acknowledgment modes (acks=0, 1, all) - Quiz 6medium Producers - Acknowledgment modes (acks=0, 1, all) - Quiz 4medium Topics and Partitions - Partition ordering guarantees - Quiz 9hard Topics and Partitions - Topic configuration - Quiz 4medium Topics and Partitions - Retention policies (time-based, size-based) - Quiz 9hard Topics and Partitions - Partition key and routing - Quiz 4medium