public static RequestAndSize parseRequest(ApiKeys apiKey, short apiVersion, ByteBuffer buffer) {
        int bufferSize = buffer.remaining();
        return new RequestAndSize(doParseRequest(apiKey, apiVersion, buffer), bufferSize);
    }
Factory method for getting a request object based on ApiKey ID and a version
clients/src/main/java/org/apache/kafka/common/requests/AbstractRequest.java