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

Offset flag ignored #14

Closed
ibalashov opened this issue Dec 4, 2014 · 6 comments
Closed

Offset flag ignored #14

ibalashov opened this issue Dec 4, 2014 · 6 comments

Comments

@ibalashov
Copy link

It looks like -o flag applies only up to kafka storage blocks, or some other caching is going on, e.g.

$ for i in {01..05}; do echo -n "$i " ; sh -c "~/kafkacat/kafkacat -C -b localhost:9092 -t topic -K\' -o 98564$i -p 0 -c 3 -u | md5sum" ; done
01 d1e6071308960d3d04c9ff911ef32516  -
02 d1e6071308960d3d04c9ff911ef32516  -

$ for i in {01..05}; do echo -n "$i " ; sh -c "~/kafkacat/kafkacat -C -b localhost:9092 -t topic -K\' -o 98574$i -p 0 -c 3 -u | md5sum" ; done
01 372ec3fd9d054638ff817f73a4c50007  -
02 372ec3fd9d054638ff817f73a4c50007  -

Messages were loaded in kafka in batches with snappy compression, latest kafkacat used.

@edenhill
Copy link
Owner

edenhill commented Dec 4, 2014

Huhm, weird. I can't reproduce it.

Can you remove the md5sum:ing and provide kafkacat with the new -O option to make it print offsets for each message. That should indicate if it is consuming the wrong messages.

@ibalashov
Copy link
Author

Thanks for pointing out the big O flag. Here is what I got:

 $ kafkacat -C -b localhost:9092 -t topic  -o 9857401 -p 0 -c 2 -u -O
9857398 ...
9857399 ...

@edenhill
Copy link
Owner

edenhill commented Dec 4, 2014

Ouch, that doesn't look good.

I'll look into it, thanks!

@edenhill
Copy link
Owner

edenhill commented Dec 4, 2014

This is a librdkafka issue, will close this one, please monitor this instead:
confluentinc/librdkafka#170

@edenhill edenhill closed this as completed Dec 4, 2014
@edenhill
Copy link
Owner

edenhill commented Dec 7, 2014

This is fixed in librdkafka master now, see confluentinc/librdkafka#170
Can you update and give it a go?
Thanks

@ibalashov
Copy link
Author

The fix worked for me, 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