Re: poll() question

2019-02-04 Thread Pere Urbón Bayes
Hi, the polls method works with an internal buffer, on a timeout it will return records in the internal buffers, not necessary from the topic/partition in the broker. Missatge de Mark Anderson del dia dl., 4 de febr. 2019 a les 19:57: > I'm sure I initially made this assumption when trying to r

Re: poll() question

2019-02-04 Thread Mark Anderson
I'm sure I initially made this assumption when trying to read all records from a compacted topic on application startup and it was incorrect. Due to latency, threading GC pauses etc it would return 0 when there were still records on the topic. Mark On Mon, 4 Feb 2019, 18:02 Pere Urbón Bayes Hi,

Re: poll() question

2019-02-04 Thread Pere Urbón Bayes
Hi, see from the javadocs: > timeout - The time, in milliseconds, spent waiting in poll if data is not available in the buffer. If 0, returns immediately with any records that are available currently in the buffer, else returns empty. Must not be negative. for a network problem it will return a

poll() question

2019-02-04 Thread Mark Horton
This is a theoretical question. I have not seen this behavior but wanted to know if it was possible. If consumer.poll() returns EMPTY, does that always mean no records are currently available? In other words, let's say there are some records in a partition. Could poll() return EMPTY if there was a