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

API for getting first and last offset of a partition #46

Closed
winbatch opened this issue Jan 2, 2014 · 6 comments
Closed

API for getting first and last offset of a partition #46

winbatch opened this issue Jan 2, 2014 · 6 comments

Comments

@winbatch
Copy link

winbatch commented Jan 2, 2014

Is this possible?

@edenhill
Copy link
Contributor

edenhill commented Jan 2, 2014

There is currently no such API.

If you need this for the consumer you can call rd_kafka_consumer_start() with the special values of RD_KAFKA_OFFSET_BEGINNING or RD_KAFKA_OFFSET_END.

What is your use case?

@winbatch
Copy link
Author

winbatch commented Jan 2, 2014

Those values should be good enough. I wanted to start consuming from the beginning, but since messages had already been purged, I didn't know from where to start

@winbatch
Copy link
Author

winbatch commented Jan 2, 2014

Brew, can you add those options to the sample progs? I believe they only take an offset

@winbatch
Copy link
Author

winbatch commented Jan 2, 2014

'Btw', not 'brew'. Damn you autocorrect!

@edenhill
Copy link
Contributor

edenhill commented Jan 2, 2014

You can run rdkafka_example with the -o <offset> argument where offset is -1 for END and -2 is BEGINNING, or an absolute actual offset (e.g, 238592).

@winbatch
Copy link
Author

winbatch commented Jan 2, 2014

Excellent. Thanks.

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

2 participants