dajac commented on a change in pull request #10470:
URL: https://github.com/apache/kafka/pull/10470#discussion_r608377759
##########
File path:
clients/src/main/java/org/apache/kafka/clients/consumer/ConsumerRecord.java
##########
@@ -77,12 +73,41 @@ public ConsumerRecord(String topic,
* @param offset The offset of this record in the corresponding Kafka
partition
* @param timestamp The timestamp of the record.
* @param timestampType The timestamp type
- * @param checksum The checksum (CRC32) of the full record
* @param serializedKeySize The length of the serialized key
* @param serializedValueSize The length of the serialized value
* @param key The key of the record, if one exists (null is allowed)
* @param value The record contents
*/
+ public ConsumerRecord(String topic,
+ int partition,
+ long offset,
+ long timestamp,
+ TimestampType timestampType,
+ int serializedKeySize,
+ int serializedValueSize,
+ K key,
+ V value) {
+ this(topic, partition, offset, timestamp, timestampType,
serializedKeySize, serializedValueSize,
+ key, value, new RecordHeaders());
+ }
+
+ /**
+ * Creates a record to be received from a specified topic and partition
(provided for
+ * compatibility with Kafka 0.10 before the message format supported
headers).
+ *
+ * @param topic The topic this record is received from
+ * @param partition The partition of the topic this record is received from
+ * @param offset The offset of this record in the corresponding Kafka
partition
+ * @param timestamp The timestamp of the record.
+ * @param timestampType The timestamp type
+ * @param serializedKeySize The length of the serialized key
+ * @param serializedValueSize The length of the serialized value
+ * @param key The key of the record, if one exists (null is allowed)
+ * @param value The record contents
+ *
+ * @deprecated use one of the constructors without a `checksum` parameter
Review comment:
It is a pity that we have to carry on these constructors. Should we
explicitly add the deprecation version in the message here and in the others?
Thinking about the future, it is a little easier to decide when they can be
removed when they do.
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]