The offset in the RecordMetadata object returned by the producerrepresents the position of the record in the partition— i.e., thesequential IDassigned by Kafka once the message is committed.
FromKafka Producer API Documentation:
“The offset is the position of the record in the partition. This is a unique, sequential number assigned by the broker.”
D refers to metadata.partition(), not offset().
B and C are unrelated to how Kafka handles committed offsets.
[Reference:Kafka Producer Java API > RecordMetadata, ============]
Contribute your Thoughts:
Chosen Answer:
This is a voting comment (?). You can switch to a simple comment. It is better to Upvote an existing comment if you don't have anything to add.
Submit