kafka-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matthias J. Sax" <mj...@apache.org>
Subject Re: Setting kafka headers in ProducerRecord
Date Tue, 02 Jun 2020 01:28:16 GMT
> 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?
> 


Mime
View raw message