From fa811dcb75c63e525fe56165a56090c327584a3e Mon Sep 17 00:00:00 2001 From: iamgd67 <67@gd67.com> Date: Thu, 28 Mar 2024 17:01:32 +0800 Subject: [PATCH] Consume request count exceeds threshold {} placeholder no parameter fix. (#7969) --- .../client/impl/consumer/DefaultLitePullConsumerImpl.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/client/src/main/java/org/apache/rocketmq/client/impl/consumer/DefaultLitePullConsumerImpl.java b/client/src/main/java/org/apache/rocketmq/client/impl/consumer/DefaultLitePullConsumerImpl.java index 9350970a07e..78dafd0ff72 100644 --- a/client/src/main/java/org/apache/rocketmq/client/impl/consumer/DefaultLitePullConsumerImpl.java +++ b/client/src/main/java/org/apache/rocketmq/client/impl/consumer/DefaultLitePullConsumerImpl.java @@ -901,7 +901,9 @@ public void run() { if ((long) consumeRequestCache.size() * defaultLitePullConsumer.getPullBatchSize() > defaultLitePullConsumer.getPullThresholdForAll()) { scheduledThreadPoolExecutor.schedule(this, PULL_TIME_DELAY_MILLS_WHEN_CACHE_FLOW_CONTROL, TimeUnit.MILLISECONDS); if ((consumeRequestFlowControlTimes++ % 1000) == 0) { - log.warn("The consume request count exceeds threshold {}, so do flow control, consume request count={}, flowControlTimes={}", consumeRequestCache.size(), consumeRequestFlowControlTimes); + log.warn("The consume request count exceeds threshold {}, so do flow control, consume request count={}, flowControlTimes={}", + (int)Math.ceil((double)defaultLitePullConsumer.getPullThresholdForAll() / defaultLitePullConsumer.getPullBatchSize()), + consumeRequestCache.size(), consumeRequestFlowControlTimes); } return; }