public static ConnectProtocolCompatibility fromProtocol(String protocolName) {
        return Arrays.stream(ConnectProtocolCompatibility.values())
                .filter(mode -> mode.protocol().equalsIgnoreCase(protocolName))
                .findFirst()
                .orElseThrow(() -> new IllegalArgumentException(
                        "Not found Connect protocol compatibility mode for protocol: " + protocolName));
    }
Return the enum that corresponds to the protocol name that is given as an argument;
if no mapping is found {@code IllegalArgumentException} is thrown.

@param protocolName the name of the connect protocol
@return the enum that corresponds to the protocol compatibility mode that supports the
given protocol
connect/runtime/src/main/java/org/apache/kafka/connect/runtime/distributed/ConnectProtocolCompatibility.java