public synchronized void requestRejoinIfNecessary(final String shortReason,
                                                      final String fullReason) {
        if (!this.rejoinNeeded) {
            requestRejoin(shortReason, fullReason);
        }
    }
Get the current generation state if the group is stable, otherwise return null

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