Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"--from-beginning" consumer equivalent? #246

Open
vbhayden opened this issue Dec 19, 2018 · 0 comments
Open

"--from-beginning" consumer equivalent? #246

vbhayden opened this issue Dec 19, 2018 · 0 comments

Comments

@vbhayden
Copy link

vbhayden commented Dec 19, 2018

With the kafka-console-consumer, there's a --from-beginning option for getting all messages across a topic's partitions. I've tried setting the startingOffset:

const consumer = new kafka.GroupConsumer({
    connectionString: KAFKA_URLS,
    startingOffset: kafka.EARLIEST_OFFSET
});

as well as the time in the subscribe call:

consumer.subscribe(KAFKA_XAPI_TOPIC, dataHandler, {
    time: kafka.EARLIEST_OFFSET
})
.then(function (result) {
    //
})

but neither of these seemed to do it. Is there a way to mimic that --from-beginning behavior from the console consumer?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant