AnonHxy commented on code in PR #18800:
URL: https://github.com/apache/pulsar/pull/18800#discussion_r1044182184


##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/AbstractDispatcherMultipleConsumers.java:
##########
@@ -189,10 +189,14 @@ private int getConsumerFromHigherPriority(int 
targetPriority) {
      * @return
      */
     private int getNextConsumerFromSameOrLowerLevel(int 
currentRoundRobinIndex) {
+        Consumer currentRRConsumer = consumerList.get(currentRoundRobinIndex);
+        if (isConsumerAvailable(currentRRConsumer)) {

Review Comment:
   Yes. This will make the code more clear with minor performance improvement 
by avoiding the first time check in the loop @Jason918 



-- 
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]

Reply via email to