lizhanhui commented on code in PR #6457:
URL: https://github.com/apache/rocketmq/pull/6457#discussion_r1147049959


##########
client/src/main/java/org/apache/rocketmq/client/impl/consumer/ConsumeMessageConcurrentlyService.java:
##########
@@ -105,9 +105,11 @@ public void shutdown(long awaitTerminateMillis) {
 
     @Override
     public void updateCorePoolSize(int corePoolSize) {
-        if (corePoolSize > 0
-            && corePoolSize <= Short.MAX_VALUE
-            && corePoolSize < 
this.defaultMQPushConsumer.getConsumeThreadMax()) {
+        if (corePoolSize > 0 && corePoolSize != 
this.consumeExecutor.getCorePoolSize()
+                && corePoolSize <= Short.MAX_VALUE) {
+            if (corePoolSize > this.consumeExecutor.getMaximumPoolSize()) {
+                this.consumeExecutor.setMaximumPoolSize(corePoolSize);
+            }

Review Comment:
   Need an else here or return early.



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