You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@kafka.apache.org by Pushkar Deole <pd...@gmail.com> on 2021/05/27 13:01:06 UTC

does consumer thread wait for producer to return (synchronous) in normal consume-process-produce topology? And how it is handled in streams?

Hi,

I am trying to understand few things:

in a normal consumer-process-produce topology, consumer is polling records,
then process each and then gives to producer to produce on destination
topic. In this case,
is the 'produce' a synchronous call i.e does it happen in the same consumer
thread or produce takes place in a background producer thread
asynchronously?

If asynchronous, then how can consumer commit offset before produce
happened successfully?
If synchronous, then consumer thread gets held till produce happens,
possibly increasing consumer lag?