-
Hello, Is it possible to use pollAndProduce method and for some records not producing messages/ProducerRecords to the broker ? Regards, |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Hello, Any update on this ? how to not produce producer records to output for some input consumer records ? Thanks in advance, |
Beta Was this translation helpful? Give feedback.
-
Hi @mikhelef, Sorry - i've missed the original question - you can use pollAndProduceMany instead.
or with Java streams / functional interfaces
|
Beta Was this translation helpful? Give feedback.
Hi @mikhelef,
Sorry - i've missed the original question - you can use pollAndProduceMany instead.
Return type for it is List - and you can return empty list when you don't want to produce a record.
As a quick example :