cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Kafka Consumer Snap

aanchalrajpal
New Contributor

Hi

I wanted to read all the records from the kafka queue in first run and then latest records from the queue from kafka consumer snap.I start reading for the first time from the queue,what setting of โ€˜seek typeโ€™ and โ€˜auto offset resetโ€™ should I use in this scenario.

3 REPLIES 3

kzhou
Former Employee

Hi,
Based on your scenario, when first run the consumer snap, you may use a new group ID in the Consumer, and set โ€˜auto offset resetโ€™ to earliest. This would let the Consumer to read from earliest at the first running (when initialize the new group). For โ€˜seek typeโ€™, you may set it to End, so that it would continue reading when resume. Hope it helps ๐Ÿ™‚

GBekkanti
New Contributor III

Hi @kzhou,

Very thanks for your above statements. Those will be work irrespective of partition number right?

Please confirm the same. Thanks in advance!

@GBekkanti, sorry for the late response. The offset in Kafka is a per-partition based, and the configuration โ€˜auto offset resetโ€™ and โ€˜seek typeโ€™ would be in the partition where the Consumer is assigned to.