public void appendControlRecordWithOffset(long offset, SimpleRecord record) {
        short typeId = ControlRecordType.parseTypeId(record.key());
        ControlRecordType type = ControlRecordType.fromTypeId(typeId);
        if (type == ControlRecordType.UNKNOWN)
            throw new IllegalArgumentException("Cannot append record with unknown control record type " + typeId);

        appendWithOffset(offset, true, record.timestamp(),
            record.key(), record.value(), record.headers());
    }
Append a control record at the given offset. The control record type must be known or
this method will raise an error.

@param offset The absolute offset of the record in the log buffer
@param record The record to append
clients/src/main/java/org/apache/kafka/common/record/MemoryRecordsBuilder.java