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

consumer keep re-consuming last message from each partition #191

Closed
npotereyko opened this issue Jan 30, 2015 · 10 comments
Closed

consumer keep re-consuming last message from each partition #191

npotereyko opened this issue Jan 30, 2015 · 10 comments

Comments

@npotereyko
Copy link

Not sure whether this is a feature or bug, but every time when I start my consumers they re-consume last event from each partition they previously consumed in previous run.
Offsets are stored in file, and after consumer finishes - I do see that offset of last consumed message is stored in ".offset" file.
But when consumer starts again, why would I consume same message again?? Shouldn't it resume from next one?
I am using librdkafka-0.8.5 release.

@edenhill
Copy link
Contributor

I think this might be the same as issue #164 .
Could you update to the latest librdkafka master and see if the problem persists?

@edenhill edenhill added the bug label Jan 31, 2015
@DEvil0000
Copy link
Contributor

sounds like dup #164

@hendrik-schumacher
Copy link

I still see this issue in a perl script using librdkafka via XS bindings (even with the latest master). If I run consume with callback and immediately call consume stop afterwards, it seems not to have the eof offset yet (I printed it and it is 0). If I put in a sleep in the consume callback it gets the eof offset and it works fine (so it seems to be some timing issue). I can try to put something together that can reproduce this but it is not that easy to break this down with all the XS binding stuff.

@edenhill
Copy link
Contributor

edenhill commented Mar 9, 2015

Thanks for the details Hendrik, should be enough to let me reproduce it.

Are you planning on open sourcing your Perl bindings, btw?

@hendrik-schumacher
Copy link

I would really like to open source the Perl bindings but I have to wrap them up first. There is still a lot to do before I can release something.

Do you have any update on the re-consumption-issue? Thanks for looking into this.

edenhill added a commit that referenced this issue Mar 20, 2015
@edenhill
Copy link
Contributor

@hendrik-schumacher Can you give it a go now?
This should fix a number of offset problems.

@hendrik-schumacher
Copy link

I tried it and it works now. Nice work.

I will start doing bigger production-like tests soon and get back if anything looks strange.

Thanks a lot.

@edenhill
Copy link
Contributor

Great!

I have a request from the homebrew people to release a new librdkafka version today and it'd be great if your additional tests were done by then, any chance of that?

@hendrik-schumacher
Copy link

I got too much else to do today so I will only be able to run this next week. Sorry. But the package looks good to me now.

@edenhill
Copy link
Contributor

Fair enough, thanks anyway!

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

No branches or pull requests

4 participants