public static String clientIdBase(WorkerConfig config) {
        String result = Optional.ofNullable(config.groupId())
                .orElse("connect");
        String userSpecifiedClientId = config.getString(CLIENT_ID_CONFIG);
        if (userSpecifiedClientId != null && !userSpecifiedClientId.trim().isEmpty()) {
            result += "-" + userSpecifiedClientId;
        }
        return result + "-";
    }
Create the base of a {@link CommonClientConfigs#CLIENT_ID_DOC client ID} that can be
used for Kafka clients instantiated by this worker. Workers should append an extra identifier
to the end of this base ID to include extra information on what they are using it for; for example,
{@code clientIdBase(config) + "configs"} could be used as the client ID for a consumer, producer,
or admin client used to interact with a worker's config topic.
@param config the worker config; may not be null
@return the base client ID for this worker; never null, never empty, and will always end in a
hyphen ('-')
connect/runtime/src/main/java/org/apache/kafka/connect/util/ConnectUtils.java