confluentinc / confluentinc/confluent-kafka-javascript

How to reset offset and re-consume a topic for an existing consumer group using Confluent Kafka JS?

Open
#280 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
304
Forks
45
Avg merge
11h 47m
Merged PRs (30d)
5

Description

I’m using the Confluent Kafka JS client and I’d like to programmatically re-consume a topic from the beginning with an already existing consumer group.

More specifically:
How can I reset the offset within my code so that the consumer starts reading the topic from the beginning again?
I’ve seen references to seek(), but I’m unsure how to use it properly in this context.
Do I need to fetch the partition metadata manually first? And what’s the recommended way to do this cleanly?

Any code example or guidance would be greatly appreciated.

Thanks in advance!

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.