@Override
    public void write(ApiMessageAndVersion record) {
        if (closed) throw new ImageWriterClosedException();
        records.add(record);
    }
Writes a metadata image to a list of records.
metadata/src/main/java/org/apache/kafka/image/writer/RecordListWriter.java