> I >> don't want the records to be distributed to available partitions based on >> kafka's default mechanism and don't want to specify the partition by >> myself
This seems to be a contradiction. If you don't want either of them, what do you want? Btw: it is ok to pass `null` as partition; for this case, the producer will use the configured `Partitioner` to compute the partition (what is the default mechanism you claim not to want). -Matthias On 5/31/20 11:59 PM, Pushkar Deole wrote: > Hi All, > > I need to use Kafka header in the ProducerRecord, however I see the > constructor to provide headers also need to mention the partition number. I > don't want the records to be distributed to available partitions based on > kafka's default mechanism and don't want to specify the partition by > myself. What is the option to provide headers without specifying the > partition? >
signature.asc
Description: OpenPGP digital signature