This is an automated email from the ASF dual-hosted git repository.

mattisonchao pushed a commit to branch branch-2.9
in repository https://gitbox.apache.org/repos/asf/pulsar.git

commit 9d206584d4bf40ecb05a5991c78a40a78ad4fbdc
Author: Xiaoyu Hou <[email protected]>
AuthorDate: Mon Jul 25 10:42:35 2022 +0800

    Fix newLookup TooManyRequestsException message (#16594)
    
    (cherry picked from commit 595bb55b8537ccb0da12dc7741a0e21fb30c23aa)
---
 .../src/main/java/org/apache/pulsar/client/impl/ClientCnx.java       | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git 
a/pulsar-client/src/main/java/org/apache/pulsar/client/impl/ClientCnx.java 
b/pulsar-client/src/main/java/org/apache/pulsar/client/impl/ClientCnx.java
index e8aed1abb55..2d7055eaff9 100644
--- a/pulsar-client/src/main/java/org/apache/pulsar/client/impl/ClientCnx.java
+++ b/pulsar-client/src/main/java/org/apache/pulsar/client/impl/ClientCnx.java
@@ -777,8 +777,9 @@ public class ClientCnx extends PulsarHandler {
                     log.debug("{} Failed to add lookup-request into waiting 
queue", requestId);
                 }
                 future.completeExceptionally(new 
PulsarClientException.TooManyRequestsException(String.format(
-                    "Requests number out of config: There are {%s} lookup 
requests outstanding and {%s} requests pending.",
-                    pendingLookupRequestSemaphore.availablePermits(),
+                    "Requests number out of config: There are {%s} lookup 
requests outstanding and {%s} requests"
+                            + " pending.",
+                    pendingLookupRequestSemaphore.getQueueLength(),
                     waitingLookupRequests.size())));
             }
         }

Reply via email to