Based on the rebalance strategy of partition and consumer, find the Kafka.client rebalance code block, restore the local environment, track debugging, discover the custom consumer Group Consumer are not assigned to Partionid, such as,
Based on this, the basic can be located to different groups consumer cannot cover partition problem root.
Read the rebalance code carefully, and found that kafka.client in obtaining consumer, did not filter according to group, get the consumer of all groups, such as
(There are only two different groups of consumer types, each consumer generates five consumerthreadid for overwriting partition)
Locate the Curconsumer variable, get it from the Consumerpertopicmap, and find the implementation of the Consumerpertopicmap
There's really no filtering here.
Add Group Filter code. Problem solving.
. NET Kafka.client multiple consumer group does not fully cover the topic Consumption research Summary (II)