specify partition for one consumer in a group can not rebalance the others
See original GitHub issueI have a topic with 150 partitions [0 - 149] And I have three consumers joinning the same group.
By default, each consumer is assigned with their own ranges.
- Consumer A : [0-49]
- Consumer B : [50-99]
- Consumer C : [100-149]
I want consumer B only consumes a specific partition. Hence within its SetPartitionsRevokedHandler
, only a specific one is returned.
IEnumerable<TopicPartitionOffset> OnPartitionsAssigned(IConsumer<MessageKey, byte[]> consumer, List<TopicPartition> partitions)
{
return new TopicPartitionOffset[]
{
new TopicPartitionOffset( new TopicPartition(_topic, 0), Offset.Unset),
};
}
I expect consumer A and C would be assigned with partition [1 - 149] I tested but it does not work in that way. Consumer A & C are not rebalanced and they are still assigned with 50 partitions each.
- Consumer A : [0-49]
- Consumer C : [100-149]
Is this a bug of client?
Confluent.Kafka nuget version : 1.2.1
- Apache Kafka version : 0.10
- Client configuration : EnableAutoCommit : false; AutoOffsetReset : Earliest
Issue Analytics
- State:
- Created 4 years ago
- Comments:8 (5 by maintainers)
Top Results From Across the Web
Kafka Consumers under the same group are ...
Kafka Consumers under the same group are consuming the same partition after rebalancing ... According to Kafka documentation: Kafka provides the ...
Read more >Kafka consumer group not rebalancing when increasing ...
I have a situation where in my dev environment, my Kafka consumer groups will rebalance and distribute partitions to consumer instances just ...
Read more >Solving My Weird Kafka Rebalancing Problems & ...
The group leader reassigns all partitions and removes every partition from the assignment that is to be transferred to another consumer.
Read more >Understanding Increased Consumer Rebalance Time
Rebalancing comes into play in Kafka when consumers join or leave a consumer group. In either case, there is a different number of...
Read more >Consumer Group Protocol: Scalability and Fault Tolerance
As consumers are added to the group, or when consumers fail or are removed from the group for some other reason, the workload...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@LGouellec - I’ve had a PR open for a few months at https://github.com/confluentinc/confluent-kafka-dotnet/pull/1133 with this.
If you’re blocked, that might help you out until some official API comes into the picture.
@LGouellec - you’re right, sorry - I got confused on partitioners and assignors. I’m taking a look at adding assignors here real soon as a PR, but it’ll probably wait on feedback on whatever happens with #1297