Hi, Tommy!
thanks for the feeback - I've reopened the PR adding the ctor overload.
I've drafted a ProducerBuilder, which can be used like:
final Producer producer = new ProducerBuilder()
.partitionerClass(DefaultPartitioner.class)
Personally, I like the idea of builders for the producer/consumer themselves,
but I'm less enthusiastic about one for ProducerRecord. Mostly because I think
the following is overly verbose/reads poorly:
producer.send(ProducerRecord.builder()
.topic("mytopic")
.key("Key")
Hi,
I was filing KAFKA-7059 ([1]) and sent a PR adding a new ctor:
--
public ProducerRecord(String topic, K key, V value, Iterable
headers)
---
One reasonable comment on the PR was instead of doing constructor
overloading, why not working on a builder for the ProducerRecord class.
I think this