NSA
NSA

Reputation: 6027

When calling commitOffsets on Kafka high level ConsumerConnector, what value gets committed?

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

Answers (1)

Gwen Shapira
Gwen Shapira

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

Related Questions