default void write(int version, ApiMessage message) {
        write(new ApiMessageAndVersion(message, (short) version));
    }
Write a record.

@param version                       The version of the record to write out.
                                     For convenience, this is an int rather than a short.
@param message                       The message of the record to write out.

@throws ImageWriterClosedException   If the writer has already been completed or closed.
metadata/src/main/java/org/apache/kafka/image/writer/ImageWriter.java