rdhabalia commented on a change in pull request #634: PIP-3 : Introduce message-dispatch rate limiting URL: https://github.com/apache/incubator-pulsar/pull/634#discussion_r132028810
########## File path: pulsar-broker/src/main/java/org/apache/pulsar/broker/service/Consumer.java ########## @@ -575,5 +578,31 @@ private void clearUnAckedMsgs(Consumer consumer) { subscription.addUnAckedMessages(-unaAckedMsgs); } + public static class SendMessageInfo { Review comment: At dispatcher, we want to know how many messages/bytes we actually sent to manage the permits. Therefore, at here in consumer, we exactly know how many msgs/bytes is sent and return it to dispatcher. Earlier, `consumer.sendMessages()` was returning `Pair<ChannelPromise, Integer>` and we wanted to add one more variable so, created `SendMessageInfo` entity to combine all information. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services