Fix on_eof behavior when the consumer group is rebalanced
When a Consumer Group is rebalanced, no messages are delivered to the consumer until the stabilization so a timeout occurs in the consume() method. The empty list is considered as we are at the end of the partition. The result is all the consumers of the group end at the same time if the rebalancing takes more than 10s.
The fix wait until a list of partitions are assigned to the consumer before testing if the end is reached.
Edited by Antoine R. Dumont