Dinosaurius
Dinosaurius

Reputation: 8628

How to reset the offset in REST proxy for reconsuming Kafka messages?

I consumed some messages from the Kafka queue, and now I want to consume them again (just fetch all data from the beginning). How can I reset the offset in Scala or using Kafka Rest Proxy? I am currently using "auto.offset.reset": "smallest":

curl -X POST -H "Content-Type: application/vnd.kafka.v1+json" \
      --data '{"format": "json", "auto.offset.reset": "smallest"}' \
      XXX.XX.XXX.XXX:9092/consumers/test

Please notice that I am not interested in the solution

Upvotes: 0

Views: 1514

Answers (1)

Natalia
Natalia

Reputation: 4532

The last param in the URL is group Id. Kafka stores committed offset per group Id. So, changing group Id should be enough (.../consumers/newGroupId).

Upvotes: 1

Related Questions