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.