The poll(timeout) method of the Java KafkaConsumer API doesn’t behave the
way you would think.  If you create a new Consumer with a groupId that has
been seen before, even if there are new events in the topic if you issue a
poll(0) it never returns any records.  I find I have to put in a loop of 2
poll(500) calls where the first call pretty much always returns nothing,
but the second will return some records (though not always all available).
Why does this happen and what’s the solution?



Josh

Reply via email to