-
Notifications
You must be signed in to change notification settings - Fork 337
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
Error sending heartbeat: Kafka::RebalanceInProgress #847
Comments
One could argue that |
Thank you for getting back @dasch! Is there a specific reason why it's being logged as Do you see any consequences or do you have any concerns when we would lower that log level to Thanks a lot! |
If you write a PR that changes it to |
Sure! I just put up #858. Let me know if I should change something 😊 |
Hey there
We are using
racecar
to write our Kafka consumers. While running them in staging and production we noticed this exception multiple times for a longer period of time in our logs:After debugging a little bit it seems like that the exception is raised here in the
ruby-kafka
library. Also all the code for handling the heartbeat is here - that's why I opened this issue in this repo.The
RebalanceInProgress
exception is getting catched and logged here:ruby-kafka/lib/kafka/consumer_group.rb
Lines 116 to 118 in f7c8510
After testing for a while we figured out that there is no "issue" or miss-behaviour if that exception is thrown - but it is logged as an error anyway. The exception gets thrown every time a consumer joins or leaves a consumer-group => every time the group is rebalancing.
My question now is: Is this really an error which needs to get logged on the error log-level or is there a negative side-effect we are not seeing/experiencing and should handle while a rebalance is in progress.
I haven't seen an option to change the behaviour of the heartbeats. The only option I see is the
heartbeat_interval
config. But changing the value has no effect - the exceptions are thrown instantly.Versions
Steps to reproduce
I was able to write a script to reproduce the behaviour:
The corresponding racecar consumer:
The first consumer works fine:
$ bundle exec racecar AssetValuesConsumer [...]
As soon as the second consumer is running (and causing a rebalance of the group) the error is logged:
$ bundle exec racecar AssetValuesConsumer [...] {}:] Error sending heartbeat: Kafka::RebalanceInProgress
The issue gets logged again after one of the both consumer is shut down.
Expected outcome
Either the
Kafka::RebalanceInProgress
exception doesn't pop up or the message isn't logged aserror
.Actual outcome
The
Kafka::RebalanceInProgress
exception gets logged aserror
.The text was updated successfully, but these errors were encountered: