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

Supporting multiple brokers #17

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ltnilaysahu
Copy link

In case , kafka-health-check is being run on a single machine and it needs to do health check on multiple brokers. This fork takes multiple broker ips separated comma and loops to do a health check on all of them.

@ltnilaysahu ltnilaysahu mentioned this pull request Oct 4, 2017
ticker := time.NewTicker(check.config.retryInterval)
defer ticker.Stop()
for {
select {
case <-ticker.C:
if err := check.tryConnectOnce(&createHealthTopicIfMissing, &createReplicationTopicIfMissing); err == nil {
return nil
}else{

Choose a reason for hiding this comment

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

Thanks for making the changes to support multiple brokers. I found a major issue and I need your help to resolve it. If one of the brokers is down during the initialization, the service gets into an infinite loop to connect to the unavailable broker and the cluster response is overridden with {"status": "red"}. That gives a false impression that the overall cluster is down, whereas other brokers are up and running. If all brokers are up and running, then it gives the complete result.

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.

3 participants