public static Map<String, String> parseCsvMap(String str) {
        Map<String, String> map = new HashMap<>();
        if (str == null || str.isEmpty())
            return map;
        String[] keyVals = str.split("\\s*,\\s*");
        for (String s : keyVals) {
            int lio = s.lastIndexOf(":");
            map.put(s.substring(0, lio).trim(), s.substring(lio + 1).trim());
        }
        return map;
    }
This method gets comma separated values which contains key,value pairs and returns a map of
key value pairs. the format of allCSVal is key1:val1, key2:val2 ....
Also supports strings with multiple ":" such as IpV6 addresses, taking the last occurrence
of the ":" in the pair as the split, eg a:b:c:val1, d:e:f:val2 => a:b:c -> val1, d:e:f -> val2
server-common/src/main/java/org/apache/kafka/server/util/Csv.java