public static String configMapToRedactedString(Map<String, Object> map, ConfigDef configDef) {
        StringBuilder bld = new StringBuilder("{");
        List<String> keys = new ArrayList<>(map.keySet());
        Collections.sort(keys);
        String prefix = "";
        for (String key : keys) {
            bld.append(prefix).append(key).append("=");
            ConfigKey configKey = configDef.configKeys().get(key);
            if (configKey == null || configKey.type().isSensitive()) {
                bld.append("(redacted)");
            } else {
                Object value = map.get(key);
                if (value == null) {
                    bld.append("null");
                } else if (configKey.type() == Type.STRING) {
                    bld.append("\"").append(value).append("\"");
                } else {
                    bld.append(value);
                }
            }
            prefix = ", ";
        }
        bld.append("}");
        return bld.toString();
    }
Translates deprecated configurations into their non-deprecated equivalents

@param configs the input configuration
@param aliasGroups A map of config to synonyms.  Each key is the non-deprecated synonym
                   For example, Map.of(a , Set.of(b), c, Set.of(d, e))
                   would declare b as a deprecated synonym for a,
                   and d and e as deprecated synonyms for c.
                   The ordering of synonyms determines the order of precedence
                   (e.g. the first synonym takes precedence over the second one)
@return a new configuration map with deprecated  keys translated to their non-deprecated equivalents
clients/src/main/java/org/apache/kafka/common/utils/ConfigUtils.java