@Override
    public boolean shouldSkipHeartbeat() {
        MemberState state = state();
        return state == MemberState.UNSUBSCRIBED ||
            state == MemberState.FATAL ||
            state == MemberState.STALE ||
            state == MemberState.FENCED;
    }
@return True if the member should not send heartbeats, which is the case when it is in a
state where it is not an active member of the group.
clients/src/main/java/org/apache/kafka/clients/consumer/internals/MembershipManagerImpl.java