XiaoyiPeng opened a new issue #3493:
URL: https://github.com/apache/rocketmq/issues/3493
**BUG REPORT**
1. Please describe the issue you observed:
a): `DefaultMQPushConsumer#setConsumeThreadMax(int consumeThreadMax)`
has no effect.
b): Potential memory exhaustion risk
When program creating the thread pool
`ConsumeMessageConcurrentlyService#consumeExecutor`, a blocking queue with no
length limit was used, as shown below :
```
public ConsumeMessageConcurrentlyService(DefaultMQPushConsumerImpl
defaultMQPushConsumerImpl,
MessageListenerConcurrently messageListener) {
\\...
this.consumeRequestQueue = new LinkedBlockingQueue<Runnable>();
this.consumeExecutor = new ThreadPoolExecutor(
this.defaultMQPushConsumer.getConsumeThreadMin(),
this.defaultMQPushConsumer.getConsumeThreadMax(),
1000 * 60,
TimeUnit.MILLISECONDS,
this.consumeRequestQueue,
new ThreadFactoryImpl("ConsumeMessageThread_"));
\\...
}
```
This will probably lead to :
a): a potential risk of running out of memory,
b): `DefaultMQPushConsumer#setConsumeThreadMax(int
consumeThreadMax) ` has no effect.
2. Please tell us about your environment:
Windows10
--
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]