You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@kafka.apache.org by Debraj Manna <su...@gmail.com> on 2018/07/01 10:24:13 UTC

Specifying negative number as partition in ProducerRecord prior to 1.1.0

In Kafka Client 1.1.0 a check is placed to not allow negative as partition
in ProducerRecord.

https://github.com/apache/kafka/blob/1.1/clients/src/main/java/org/apache/kafka/clients/producer/ProducerRecord.java#L73

But I don;t see any such check in ProducerRecord in kafka client 0.10.0.
Can someone let me know how does Kafka handle the negative number in
partition in ProducerRecord in 0.10? Will the partition be converted to
positive number ? If yes can some one point me to the code / logic of the
conversion?