michaeljmarshall commented on a change in pull request #10166:
URL: https://github.com/apache/pulsar/pull/10166#discussion_r617258941



##########
File path: 
pulsar-client/src/main/java/org/apache/pulsar/client/impl/ConsumerImpl.java
##########
@@ -854,7 +854,17 @@ private void sendFlowPermitsToBroker(ClientCnx cnx, int 
numMessages) {
                 log.debug("[{}] [{}] Adding {} additional permits", topic, 
subscription, numMessages);
             }
 
-            cnx.ctx().writeAndFlush(Commands.newFlow(consumerId, numMessages), 
cnx.ctx().voidPromise());
+            cnx.ctx().writeAndFlush(Commands.newFlow(consumerId, numMessages))
+                    .addListener(writeFuture -> {
+                        if (log.isDebugEnabled()) {

Review comment:
       I agree. I think it'd be better to only add the listener if debug 
logging is enabled.




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to