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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]