apache / rocketmq

Apache RocketMQ is a cloud native messaging and streaming platform, making it simple to build event-driven applications.
https://rocketmq.apache.org/
Apache License 2.0
21.19k stars 11.67k forks source link

DefaultMQPushConsumerImpl#adjustThreadPool() has no effect. #3492

Closed XiaoyiPeng closed 1 year ago

XiaoyiPeng commented 2 years ago

BUG REPORT

  1. Please describe the issue you observed: DefaultMQPushConsumerImpl#adjustThreadPool() has no effect. The code shown below:
public void adjustThreadPool() {
        long computeAccTotal = this.computeAccumulationTotal();
        long adjustThreadPoolNumsThreshold = this.defaultMQPushConsumer.getAdjustThreadPoolNumsThreshold();

        long incThreshold = (long) (adjustThreadPoolNumsThreshold * 1.0);

        long decThreshold = (long) (adjustThreadPoolNumsThreshold * 0.8);

        if (computeAccTotal >= incThreshold) {
            this.consumeMessageService.incCorePoolSize();
        }

        if (computeAccTotal < decThreshold) {
            this.consumeMessageService.decCorePoolSize();
        }
    }

The method ConsumeMessageService#incCorePoolSize() does nothing in their implementation class:

  1. org.apache.rocketmq.client.impl.consumerConsumeMessageConcurrentlyService

  2. org.apache.rocketmq.client.impl.consumer.ConsumeMessageOrderlyService

    For example, in class org.apache.rocketmq.client.impl.consumerConsumeMessageConcurrentlyService, this method has a empty body:

    @Override
    public void incCorePoolSize() {
    
    }
    
    @Override
    public void decCorePoolSize() {
    
    }
  3. Please tell us about your environment:

    Windows10

github-actions[bot] commented 1 year ago

This issue is stale because it has been open for 365 days with no activity. It will be closed in 3 days if no further activity occurs.

github-actions[bot] commented 1 year ago

This issue was closed because it has been inactive for 3 days since being marked as stale.