private void maybeThrowInvalidGroupIdException() {
        if (groupId == null || groupId.isEmpty()) {
            throw new InvalidGroupIdException(
                    "You must provide a valid " + ConsumerConfig.GROUP_ID_CONFIG + " in the consumer configuration.");
        }
    }
Release the light lock protecting the consumer from multithreaded access.
clients/src/main/java/org/apache/kafka/clients/consumer/internals/ShareConsumerImpl.java