Re: KIP-658 Deprecate all setters of Headers

2020-09-11 Thread Matthias J. Sax
Well, I am not totally sure if immutability is actually desired for `Headers`? Consider the case when there is an application that just wants to add for example a tracing header field. It would just call `add()` on the consumer record's headers and pass the modified `Headers` object to the `Produc

Re: KIP-658 Deprecate all setters of Headers

2020-08-18 Thread Chia-Ping Tsai
> If you create a new `ProducerRecord` you would not pass in a `Headers` > object but a `Iterable`? > > And for `ConsumerRecord` you just get a `Headers` object back and don't > need to worry about the concrete implementation? You are right. I'd give a bad case :( For another reason, could we av

Re: KIP-658 Deprecate all setters of Headers

2020-08-18 Thread Matthias J. Sax
Thanks for the KIP. However, I am not sure for what use-case you would need to implement the `Headers` interface? If you create a new `ProducerRecord` you would not pass in a `Headers` object but a `Iterable`? And for `ConsumerRecord` you just get a `Headers` object back and don't need to worry a