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

HighLevelConsumer leaving partitions without owner on multiple consumers startup #541

Closed
cesaraugustogarcia opened this issue Dec 23, 2016 · 3 comments

Comments

@cesaraugustogarcia
Copy link
Contributor

Hi,

when I startup several consumers normally my queue ends up with several partitions without owner (checking with kafka-consumer-offset-checker.sh ).

In my scenario, I have more than double number of consumers than partitions. For example, 38 consumers for 16 partitions on my queue. And when starting (or restarting) all my consumers I end up always with partitions left with no owner.

@hyperlink
Copy link
Collaborator

hyperlink commented Jan 3, 2017

Could you go into more detail on how your issue was fixed by exposing the retry configs?

@cesaraugustogarcia
Copy link
Contributor Author

Absolutely. Upon my investigation on startup of my multiple servers, I have serious suspects that the problem is because of contention of servers trying to get ownership of partitions at the same time.

I also noticed that with the default configuration, the period used to retry is always the same, so I focused on having each consumer using a different period of time for the retries, set up when it starts (this mean this period will remain the same, but should be different for each consumer). I was able to get this with this config:

rebalanceRetry: {
  retries:    20,
  factor:     1,
  minTimeout: Math.random() * 20000,
  maxTimeout: 20000 + 1,
  randomize:  false
}

And the results so far are really good.

@cesaraugustogarcia
Copy link
Contributor Author

@hyperlink Should I close the issue? Or you prefer to leave it open for more feedback?

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