Reputation: 517
I've read the documentation and i found the config "auto.offset.reset" :
What to do when there is no initial offset in ZooKeeper or if an offset is out of range:
the question is that I used to consumer kafka with a group id and I want to keep the group id but abandon the old message.
How can I do this ?
Upvotes: 1
Views: 417
Reputation: 17443
You can try to do this in your consumer in ConsumerRebalanceListener.onPartitionsAssigned
:
public void onPartitionsAssigned(Collection<TopicPartition> partitions) {
kafkaConsumer.seekToEnd(partitions);
}
Upvotes: 2