[CAMEL-18527] Camel Kafka Component: batch producer with individual headers - 
ASF JIRA <https://issues.apache.org/jira/browse/CAMEL-18527>


On 2022/09/19 15:55:01 Claus Ibsen wrote:
> Hi
> 
> Yeah this sounds reasonable, you are welcome to create a JIRA and send a PR.
> 
> 
> On Mon, Sep 19, 2022 at 3:15 PM r.wiedm...@bitproquo.org <
> r.wiedm...@bitproquo.org> wrote:
> 
> > Hi all,
> >
> > if we look at classes KafkaProducer and KeyValueIterator, we see that it
> > is possible to send a batch of kafka messages,
> > but only with identical set of headers which is determined by the „parent“
> > Exchange which holds the Iterator or Iterable in its body.
> >
> > In our usecase, the body contains a list of Exchanges which we want to use
> > to determine the individual headers for every batch-instance
> > in the same way like currently the „parent“ Exchange is used.
> > Actually we solve our demands by creating some copy/pasting the mentioned
> > classes and applying minor changes to it (which is a dirty hack).
> >
> >
> > Our proposal is to define a new configuration flag named like
> > „batchWithIndividualHeaders“ which enables the creation of individual
> > headers.
> >
> >
> > To implement this, the constructor parameter „propagatedHeaders“ in class
> > KeyValueHolderIterator might by replaced with some kind of
> > Provider-Lambda which relays to KafkaProducer::getPropagatedHeaders, but
> > is called inside KeyValueHolderIterator for every batch-element.
> >
> >
> > IMHO this is a common usecase and worth to implement it in the camel
> > library itself.
> >
> >
> > What do you think?
> 
> 
> 
> -- 
> Claus Ibsen
> -----------------
> http://davsclaus.com @davsclaus
> Camel in Action 2: https://www.manning.com/ibsen2
>  


Viele Grüße,

Ralf Wiedmann



---
bitproquo GmbH
Wilhelmshöher Weg 87 34130 Kassel
Tel:  +49 561 / 3 22 35
mailto:i...@bitproquo.org
http://www.bitproquo.org
Key Fingerprint = A528 0F91 1CD4 005D 6E18 719E F84C 80F1 26E7 D149
AG Kassel HRB 16277
Geschäftsführung:
Dipl.-Math. Ralf Wiedmann





Reply via email to