private void setReadOnly(Headers headers) {
        if (headers instanceof RecordHeaders) {
            ((RecordHeaders) headers).setReadOnly();
        }
    }
Implementation of asynchronously send a record to a topic.
clients/src/main/java/org/apache/kafka/clients/producer/KafkaProducer.java