protected synchronized Generation generation() {
        return generation;
    }
Get the current generation state, regardless of whether it is currently stable.
Note that the generation information can be updated while we are still in the middle
of a rebalance, after the join-group response is received.

@return the current generation
clients/src/main/java/org/apache/kafka/clients/consumer/internals/AbstractCoordinator.java