public void appendWithOffset(long offset, LegacyRecord record) {
        appendWithOffset(offset, record.timestamp(), record.key(), record.value());
    }
Add a record with a given offset. The record must have a magic which matches the magic use to
construct this builder and the offset must be greater than the last appended record.
@param offset The offset of the record
@param record The record to add
clients/src/main/java/org/apache/kafka/common/record/MemoryRecordsBuilder.java