public static Properties parseKeyValueArgs(List<String> args, boolean acceptMissingValue) {
        Properties props = new Properties();
        List<String[]> splits = new ArrayList<>();
        args.forEach(arg -> {
            String[] split = arg.split("=", 2);
            if (split.length > 0) {
                splits.add(split);
            }
        });
        splits.forEach(split -> {
            if (split.length == 1 || (split.length == 2 && (split[1] == null || split[1].isEmpty()))) {
                if (acceptMissingValue) {
                    props.put(split[0], "");
                } else {
                    throw new IllegalArgumentException(String.format("Missing value for key %s}", split[0]));
                }
            } else {
                props.put(split[0], split[1]);
            }
        });
        return props;
    }
Parse key-value pairs in the form key=value.
Value may contain equals sign.
server-common/src/main/java/org/apache/kafka/server/util/CommandLineUtils.java