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

Handling tcp disconnections #45

Open
jpuigm opened this issue Aug 6, 2016 · 2 comments
Open

Handling tcp disconnections #45

jpuigm opened this issue Aug 6, 2016 · 2 comments

Comments

@jpuigm
Copy link

jpuigm commented Aug 6, 2016

Hi Hernán,

We've been using your driver for a while but we've recently come across some odd behavior when it comes to kafkerl handling re-connection to an "on-purpose" taken down broker of Kafka.

What kafkerl does is to handle the tcp_closed message from gen_tcp. Then the process tries to reconnect and if it runs out of retries, it will stop with reason {error, unable_to_connect}. That will make kafkerl_connector to die with the same reason as well, as the link is propagated (kafkerl_connector isn't trapping exits), and as a consequence of that dying, it will propagate the exit to the other kaka_broker_connection processes that could be connected to other brokers.

Is this the desirable behavior? To me it looks that we'd like to protect those other processes from dying so we maintain the connection to other brokers.

I hope I was descriptive enough.

Thanks.

@HernanRivasAcosta
Copy link
Owner

It is intentional because after a broker goes down, zookeeper might decide to move the topics around. I guess it could be "fixed" by simply checking which brokers should be restarted instead of just restarting them all. I will think about doing that, could you please add an issue so I can look into it?

@jpuigm
Copy link
Author

jpuigm commented Aug 19, 2016

Isn't this considered an issue? I can open another one with a more relevant title if you want me to.

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