-
Notifications
You must be signed in to change notification settings - Fork 141
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
Fix slow rebalanceSafeCommits behavior #1358
Conversation
After consumer 1 is shutdown (using stopConsumption), rebalances happen and partitions from consumer 2 are assigned. These streams are never started, so the finalizer completing completedPromise is never called. Waiting for these to complete takes 3 minutes (default maxRebalanceDuration). In case that streams were assigned and no record was ever put in their queues, there's no need to wait for the stream to complete.
@erikvanoosten If this mechanism is okay by you, we can add to it:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Smart!
IMHO this PR is already very valuable in itself and I wouldn't await merging. These 2 improvements can be put in follow up PRs. |
Alright let's do that. |
After consumer 1 is shutdown (using stopConsumption), rebalances happen and partitions from consumer 2 are assigned. These streams are never started, so the finalizer completing completedPromise is never called. Waiting for these to complete takes 3 minutes (default maxRebalanceDuration).
In case that streams were assigned and no record was ever put in their queues, there's no use in waiting for the stream to complete by committing some offset.