Kafka - Consumer GroupsGiven a consumer group with 3 consumers and 6 partitions, what happens after one consumer leaves the group?AThe consumer group stops consuming messagesBThe remaining 2 consumers rebalance and each consumes 3 partitionsCThe partitions are left unassigned until the group is restartedDThe remaining consumers continue consuming their original partitionsCheck Answer
Step-by-Step SolutionSolution:Step 1: Understand partition assignmentPartitions are divided evenly among active consumers in the group.Step 2: Calculate new assignment after consumer leavesWith 6 partitions and 2 consumers left, each gets 3 partitions after rebalance.Final Answer:The remaining 2 consumers rebalance and each consumes 3 partitions -> Option BQuick Check:Partitions evenly split after consumer leaves [OK]Quick Trick: Partitions redistribute evenly after consumer leaves [OK]Common Mistakes:Assuming partitions stay with old consumersThinking partitions become unassignedBelieving the group stops consuming
Master "Consumer Groups" in Kafka9 interactive learning modes - each teaches the same concept differentlyLearnWhyDeepVisualTryChallengeProjectRecallTime
More Kafka Quizzes Consumer Groups - Cooperative vs eager rebalancing - Quiz 9hard Kafka Basics and Event Streaming - Kafka CLI tools overview - Quiz 6medium Kafka Basics and Event Streaming - Event streaming concept - Quiz 5medium Kafka Basics and Event Streaming - Message broker architecture - Quiz 14medium Kafka Cluster Architecture - Leader election - Quiz 9hard Producers - Acknowledgment modes (acks=0, 1, all) - Quiz 15hard Producers - Serialization (String, JSON, Avro) - Quiz 15hard Producers - Why producers publish data - Quiz 6medium Topics and Partitions - Topic deletion and cleanup - Quiz 4medium Topics and Partitions - Topic deletion and cleanup - Quiz 8hard