chia7712 commented on code in PR #19056: URL: https://github.com/apache/kafka/pull/19056#discussion_r1976092524
########## clients/src/main/java/org/apache/kafka/clients/consumer/ConsumerRecord.java: ########## @@ -27,6 +27,8 @@ * A key/value pair to be received from Kafka. This also consists of a topic name and * a partition number from which the record is being received, an offset that points * to the record in a Kafka partition, and a timestamp as marked by the corresponding ProducerRecord. + * + * This class is not thread-safe! Review Comment: There are 3 issues (at least) about the multithreaded issue on ConsumerRecords. Hence, it would be better to document it completely. Could you please also includes following changes? 1. Highlight the risk of using header in multithread 2. Explain why we don't make this object thread-safe -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org