Skip to content

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

Open
@ArekCzarnikRTL

Description

@ArekCzarnikRTL

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions