Skip to content

Handle case where broker address changes but node_id does not #440

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

Merged
merged 4 commits into from
Oct 23, 2017

Conversation

gotascii
Copy link

This is a continuation/retry of #291 I had some time to dig in and, hopefully, the approach here is a bit more targeted. The idea is, if the host and/or port does not match what the broker_pool has in memory, there's no chance that connections will work and the in-memory broker information needs to be evicted. We're running this in production right now and have successfully pulled and replaced brokers without causing consumers to crash and/or enter into endless connection error loops. Let me know if there's anything else I can provide/tweak to help get this on its way upstream :)

Also, there's a bonus tweak in lib/kafka/cluster.rb :) When testing consumer resiliency I ran in to the situation where the coordinator was updated after the response with the old coordinator id came back. I added a single refresh + retry and never saw this happen again.

Copy link
Contributor

@dasch dasch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 ❤️

@dasch dasch merged commit 4ccf772 into zendesk:master Oct 23, 2017
@gotascii gotascii deleted the jm-handle-broker-address-change branch October 26, 2017 23:37
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

Successfully merging this pull request may close these issues.

2 participants