public short latestUsableVersion(ApiKeys apiKey) {
        return latestUsableVersion(apiKey, apiKey.oldestVersion(), apiKey.latestVersion());
    }
Return the most recent version supported by both the node and the local software.
clients/src/main/java/org/apache/kafka/clients/NodeApiVersions.java