You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/03/15 08:16:51 UTC

[GitHub] [pulsar] aloyszhang edited a comment on pull request #14566: [client] Optimize pause when creating sub consumers in multi-topic consumer

aloyszhang edited a comment on pull request #14566:
URL: https://github.com/apache/pulsar/pull/14566#issuecomment-1067689183


   @Jason918 
   After creating a new `ConsumerImpl` for a topic partition, before sending `FLOW` command, client will check 
   ```java
   if (!(firstTimeConnect && hasParentConsumer) && getCurrentReceiverQueueSize() != 0) {
                       increaseAvailablePermits(cnx, getCurrentReceiverQueueSize());
                   }
   ```
   `hasParentConsumer` is always `true` for multiTopicConsumer, so the new created will not send `FLOW` command to broker.
   
   BTW, [#11974](https://github.com/apache/pulsar/pull/11974) introduce `startPaused` for creating new `ConsumerImpl`, so this pull request is a nice optimize for me. And left a comment, PTAL.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org