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

Checkpointing With SimpleConsumer and OffsetCommitContext #416

Closed
levetm-washpost opened this issue Jun 19, 2015 · 3 comments
Closed

Checkpointing With SimpleConsumer and OffsetCommitContext #416

levetm-washpost opened this issue Jun 19, 2015 · 3 comments

Comments

@levetm-washpost
Copy link

I was working with this sample code: http://kafka-python.readthedocs.org/en/latest/apidoc/kafka.html?highlight=offsetcommitcontext#kafka.context.OffsetCommitContext (adding in consumer.commit() call every 100 marks). I noticed that when I would terminate and restart my Python script, it would read from the beginning of the log file rather than from the last marked offset.

Is there a way to handle checkpointing in the kafka-python library, so if my program unexpectedly terminates, it can begin reading from the last marked offset in the Kafka log?

@dpkp
Copy link
Owner

dpkp commented Jun 19, 2015

Thanks for filing! I actually have never looked at OffsetCommitContext ... not sure if that works as advertised and pretty sure we have no tests for it. needs investigation.

@levetm-washpost
Copy link
Author

It seems to be checkpointing, but during the running instance of the program. So I could roll back during a run of my application. It doesn't seem to (as far as I can tell) support picking up close to where I left off if my program terminates and is restarted.

@jeffwidman
Copy link
Contributor

Closing this as "won't fix", since the SimpleConsumer is deprecated and will be removed in #1193 as part of the 2.x release series.

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

3 participants