-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[client] Optimize pause when creating sub consumers in multi-topic consumer #14566
[client] Optimize pause when creating sub consumers in multi-topic consumer #14566
Conversation
/pulsarbot run-failure-checks |
2 similar comments
/pulsarbot run-failure-checks |
/pulsarbot run-failure-checks |
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.
LGTM, is it able to add a test?
@Jason918 if (!(firstTimeConnect && hasParentConsumer) && getCurrentReceiverQueueSize() != 0) {
increaseAvailablePermits(cnx, getCurrentReceiverQueueSize());
}
BTW, #11974 introduce Left a comment, PTAL. |
pulsar-client/src/main/java/org/apache/pulsar/client/impl/MultiTopicsConsumerImpl.java
Show resolved
Hide resolved
pulsar-client/src/main/java/org/apache/pulsar/client/impl/MultiTopicsConsumerImpl.java
Show resolved
Hide resolved
Great point. I have updated the motivation description. |
(cherry picked from commit a32edc7)
(cherry picked from commit a32edc7)
Motivation
Currently, if we subscribe new partitions/topics when multiTopicConsumer is paused, the sub consumers will start in non-pause mode and then changed to pause.
Modifications
Set
startPause
config when creating sub consumers.Verifying this change
This change is already covered by existing tests, such as
Does this pull request potentially affect one of the following parts:
If
yes
was chosen, please highlight the changesDocumentation
Check the box below and label this PR (if you have committer privilege).
Need to update docs?
no-need-doc
Internal optimization.