I guess it depends where the exception comes from? Can you clarify? -Matthias
On 9/23/20 12:53 AM, Zhen Zhang wrote: > Hi there, > > I am new to Kafka and I would like to get some clarifications for a newbie > question, > > Let's say if I have set up my consumer's "enable.auto.commit" to false, and > then poll the records one at a time. So when calling poll(), starting from > offset 0, if any exception is thrown, should I expect to get the record at > offset 0 or offset 1 when I call poll() again? The reason I'm asking for > this is bc in the Kafka Doc, it says that, > "The position of the consumer gives the offset of the next record that will > be given out. It will be one larger than the highest offset the consumer > has seen in that partition. It automatically advances every time the > consumer receives messages in a call to poll(Duration)." > > But in my described situation above, an exception is thrown, I'm not sure > if this is counted as a successful poll (meaning that the next poll() will > give the next record) or a failed one (meaning that the next poll() will > give the same record again). > > I would really appreciate it for your help. > > Thanks, > Zhen Zhang > Software Engineer > [image: Twilio] <https://www.twilio.com/?utm_source=email_signature> > MOBILE (949) 771-6073 > EMAIL zzh...@twilio.com >