As I read Kafka's paper, I found the papers says during rebalance, "when there are multiple consumers within a group, each of them will be notified of a broker or a consumer change. However, the notification may come at slightly different times at the consumers. So, it is possible that one consumer tries to take ownership of a partition still owned by another consumer. When this happens, the first consumer simply releases all the partitions that it currently owns, waits a bit and retries the rebalance process"
I am wondering how one consumer knows when another consumer takes ownership of a partition it currently owns?
I think that may be some underlying mechanism notifying this condition or coordination within a consumer group.