Bird
0
0

In a Kafka consumer group, if two consumers have the same group instance id, what rebalance behavior occurs?

medium📝 Debug Q7 of 15
Kafka - Consumer Groups
In a Kafka consumer group, if two consumers have the same group instance id, what rebalance behavior occurs?
AConsumers share partitions without rebalance
BBoth consumers consume all partitions simultaneously
COne consumer is kicked out causing frequent rebalances
DKafka merges the consumers into one logical consumer
Step-by-Step Solution
Solution:
  1. Step 1: Understand group instance id uniqueness

    Group instance id must be unique per consumer to avoid conflicts.
  2. Step 2: Analyze effect of duplicate instance ids

    Kafka treats duplicate instance ids as the same consumer, kicking out one and causing rebalances.
  3. Final Answer:

    One consumer is kicked out causing frequent rebalances -> Option C
  4. Quick Check:

    Duplicate instance id = consumer eviction and rebalance [OK]
Quick Trick: Unique group instance ids prevent consumer eviction during rebalance [OK]
Common Mistakes:
  • Assuming consumers share partitions safely
  • Thinking Kafka merges consumers automatically
  • Believing both consume all partitions simultaneously

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kafka Quizzes