Skip to content

Add a check to ensure broker connection is ready during poll if auto commit is disabled #2672

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

TribuneX
Copy link

Potentially fixes #2667

If enable_auto_commit=False the CPU usage of a kafka consumer increases to 100% if the broker connection is lost. If enable_auto_commit=True, the connection loss is detected by the periodic auto commit, which acts as a sort of health check in this case.

I added a similar check to the poll method. I am not sure if this the best location, thats why I also did not add any test yet.
We might also only check the readiness in case enabled_auto_commit=False.

Looking forward to your 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

Successfully merging this pull request may close these issues.

Consumer randomly stucks and timeouts when communicating with confluent cloud
1 participant