public static Optional<String> reasonNotSupported(
        short newVersion,
        String what,
        VersionRange range
    ) {
        if (!range.contains(newVersion)) {
            if (range.max() == (short) 0) {
                return Optional.of(what + " does not support this feature.");
            } else {
                return Optional.of(what + " only supports versions " + range);
            }
        }
        return Optional.empty();
    }
A holder class of the local node's supported feature flags as well as the quorum node IDs.
metadata/src/main/java/org/apache/kafka/controller/QuorumFeatures.java