Reputation: 6027
When commitOffsets is called, what value gets committed the offset of the latest message pulled from the KafkaStream next call? or the value of the greatest offset buffered by the consumer or some other value?
Upvotes: 2
Views: 990
Reputation: 5158
It will be the greatest value fetched by the consumer (i.e. read by the client with next(), does not include the values internally buffered).
However note that if the Consumer was used to instantiate multiple iterators for use by multiple threads, they will all commit at once - typically not the intended behavior since one thread can't know about the processing status of other threads.
Upvotes: 4