boolean ensureActiveGroup(final Timer timer) {
        // always ensure that the coordinator is ready because we may have been disconnected
        // when sending heartbeats and does not necessarily require us to rejoin the group.
        if (!ensureCoordinatorReady(timer)) {
            return false;
        }

        startHeartbeatThreadIfNeeded();
        return joinGroupIfNeeded(timer);
    }
Ensure the group is active (i.e., joined and synced)

@param timer Timer bounding how long this method can block
@throws KafkaException if the callback throws exception
@return true iff the group is active
clients/src/main/java/org/apache/kafka/clients/consumer/internals/AbstractCoordinator.java