I am running a Kafka cluster on Kubernetes. I am implementing a custom PartitionAssignor to personalize the way topic partitions are assigned to existing consumers in the consumer group. To this end, I am overriding the method Map<String, Assignment> assign( Cluster metadata, Map<String, Subscription> subscriptions)
If inside the assign method I dynamically created a new consumer through the Kubernetes client APIs, how would the rebalancing protocol behave in such case. Precisely, when the newly created consumer send a joinGroup request to the group coordinator(while the rebalancing process is still in progress), would the current in progress rebalancing completes, and then a new rebalance process is triggered to accommodate for the newly created consumer? Thanks.