Firstly, go through the first part of producer sending the message The ProduceRecord has 6 main properties: a. topic: the topic the record will be tiered with. b. partition: the partition which the record will be sent to c. timestamp: the timestamp the record is marked. null to use System.currentTimeMills() d. key: e: value: f: header: let's the check the main core line of send the message from KafkaProducer.doSend: RecordAccumulator.RecordAppendResult result = accumulator .append(tp , timestamp , serializedKey , serializedValue , headers , interceptCallback , remainingWaitMs) ; all other lines are used to collect data for this method: tp: TopicPartition the destination where the message will go timestamp: the created time of record serializedKey: the bytes of message key value. serializedValue: the bytes of message body value. headers: interceptCallback: remainingWaitMs: