nodece commented on code in PR #24830:
URL: https://github.com/apache/pulsar/pull/24830#discussion_r2415440131


##########
pulsar-client/src/main/java/org/apache/pulsar/client/impl/ProducerStatsRecorderImpl.java:
##########
@@ -332,7 +332,7 @@ public double getSendLatencyMillisMax() {
 
     @Override
     public int getPendingQueueSize() {
-        return producer.getPendingQueueSize();
+        return producer != null ? producer.getPendingQueueSize() : -1;

Review Comment:
   ```suggestion
           return producer != null ? producer.getPendingQueueSize() : 0;
   ```
   
   I think we should return 0 if producer is null.



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