You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rocketmq.apache.org by GitBox <gi...@apache.org> on 2022/02/07 04:07:25 UTC
[GitHub] [rocketmq-spring] joewee opened a new issue #429: The 'consumeThreadMax' in annotation @RocketMQMessageListener is not works well
joewee opened a new issue #429:
URL: https://github.com/apache/rocketmq-spring/issues/429
The issue tracker is **ONLY** used for bug report and feature request.
Any question or RocketMQ proposal please use our [mailing lists](http://rocketmq.apache.org/about/contact/).
**BUG REPORT**
1. Please describe the issue you observed:
- What did you do (The steps to reproduce)?
@RocketMQMessageListener(
topic = "topic1",
consumerGroup = "consumer1",
consumeThreadMax = 32 )
public class DemoConsumer implements RocketMQListener<String> {
}
- What did you expect to see?
The max number of consumer threads can be reached to 32
- What did you see instead?
The number of consumer threads can only reach 20
2. Please tell us about your environment:
3. Other information (e.g. detailed explanation, logs, related issues, suggestions how to fix, etc):
Because ThreadPoolExecutor in implementation of ConsumeMessageService interface uses LinkedBlockingQueue with default capacity bound (Integer.MAX_VALUE) ,the threads will only increase when the LinkedBlockingQueue is full, so 'consumeThreadMax' is not works well as expected .
--
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: dev-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [rocketmq-spring] joewee commented on issue #429: The 'consumeThreadMax' in annotation @RocketMQMessageListener is not works well
Posted by GitBox <gi...@apache.org>.
joewee commented on issue #429:
URL: https://github.com/apache/rocketmq-spring/issues/429#issuecomment-1032581223
> >
>
>
>
> Do you mean to use consumeThreadNum to adjust consumeThreadMin and consumeThreadMax in rocketmq-spring at the same time?
Yes,it's right,i mean
to use consumeThreadNum instead of consumeThreadMax and consumeThreadMin, so that the core thread number and max thread number of the consumer thread pool executors has the same thread number.
--
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: dev-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [rocketmq-spring] RongtongJin commented on issue #429: The 'consumeThreadMax' in annotation @RocketMQMessageListener is not works well
Posted by GitBox <gi...@apache.org>.
RongtongJin commented on issue #429:
URL: https://github.com/apache/rocketmq-spring/issues/429#issuecomment-1031247708
Duplicate with #173 #184. The issue does exist, but it needs to be fixed in the RocketMQ main repo code.
--
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: dev-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [rocketmq-spring] RongtongJin edited a comment on issue #429: The 'consumeThreadMax' in annotation @RocketMQMessageListener is not works well
Posted by GitBox <gi...@apache.org>.
RongtongJin edited a comment on issue #429:
URL: https://github.com/apache/rocketmq-spring/issues/429#issuecomment-1032369199
>
Do you mean to use consumeThreadNum to adjust consumeThreadMin and consumeThreadMax at the same time?
--
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: dev-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [rocketmq-spring] RongtongJin edited a comment on issue #429: The 'consumeThreadMax' in annotation @RocketMQMessageListener is not works well
Posted by GitBox <gi...@apache.org>.
RongtongJin edited a comment on issue #429:
URL: https://github.com/apache/rocketmq-spring/issues/429#issuecomment-1032369199
>
Do you mean to use consumeThreadNum to adjust consumeThreadMin and consumeThreadMax in rocketmq-spring at the same time?
--
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: dev-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [rocketmq-spring] RongtongJin commented on issue #429: The 'consumeThreadMax' in annotation @RocketMQMessageListener is not works well
Posted by GitBox <gi...@apache.org>.
RongtongJin commented on issue #429:
URL: https://github.com/apache/rocketmq-spring/issues/429#issuecomment-1033317260
Merged
--
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: dev-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [rocketmq-spring] joewee commented on issue #429: The 'consumeThreadMax' in annotation @RocketMQMessageListener is not works well
Posted by GitBox <gi...@apache.org>.
joewee commented on issue #429:
URL: https://github.com/apache/rocketmq-spring/issues/429#issuecomment-1032122875
I have read the relevant code in ConsumeMessageConcurrentlyService and ConsumeMessageOrderlyService, i think the purpose of use LinkedBlockingQueue with default capacity bound (Integer.MAX_VALUE) is to avoid the message loss caused by the task rejection or the entire consumption process to be blocked as much as possible. In my opinion the implementation of ConsumeMessageService is right, in other words use one property like 'consumeThreadNum' instead of the 'consumeThreadMax' maybe more suitable for this,then what's your opinion?
--
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: dev-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [rocketmq-spring] RongtongJin commented on issue #429: The 'consumeThreadMax' in annotation @RocketMQMessageListener is not works well
Posted by GitBox <gi...@apache.org>.
RongtongJin commented on issue #429:
URL: https://github.com/apache/rocketmq-spring/issues/429#issuecomment-1032369199
>
Do you mean to use consumeThreadNum annotation to adjust consumeThreadMin and consumeThreadMax at the same time?
--
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: dev-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [rocketmq-spring] RongtongJin closed issue #429: The 'consumeThreadMax' in annotation @RocketMQMessageListener is not works well
Posted by GitBox <gi...@apache.org>.
RongtongJin closed issue #429:
URL: https://github.com/apache/rocketmq-spring/issues/429
--
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: dev-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [rocketmq-spring] joewee edited a comment on issue #429: The 'consumeThreadMax' in annotation @RocketMQMessageListener is not works well
Posted by GitBox <gi...@apache.org>.
joewee edited a comment on issue #429:
URL: https://github.com/apache/rocketmq-spring/issues/429#issuecomment-1032122875
I have read the relevant code in ConsumeMessageConcurrentlyService and ConsumeMessageOrderlyService, i think the purpose of use LinkedBlockingQueue with default capacity bound (Integer.MAX_VALUE) is to avoid the message loss caused by the task rejection or the entire consumption process to be blocked as much as possible. In my opinion the implementation of ConsumeMessageService is right, in other words use one property like 'consumeThreadNum' instead of the 'consumeThreadMax' maybe more suitable for this,then what's your opinion?
> Duplicate with #173 #184. The issue does exist, but it needs to be fixed in the RocketMQ main repo code.
--
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: dev-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [rocketmq-spring] RongtongJin commented on issue #429: The 'consumeThreadMax' in annotation @RocketMQMessageListener is not works well
Posted by GitBox <gi...@apache.org>.
RongtongJin commented on issue #429:
URL: https://github.com/apache/rocketmq-spring/issues/429#issuecomment-1032655710
> > >
> >
> >
> > Do you mean to use consumeThreadNum to adjust consumeThreadMin and consumeThreadMax in rocketmq-spring at the same time?
>
> Yes,it's right,i mean to use consumeThreadNum instead of consumeThreadMax and consumeThreadMin, so that the core thread number and max thread number of the consumer thread pool executors has the same thread number.
I got it! Could you submit a pull request to fix the issue?
--
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: dev-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [rocketmq-spring] joewee commented on issue #429: The 'consumeThreadMax' in annotation @RocketMQMessageListener is not works well
Posted by GitBox <gi...@apache.org>.
joewee commented on issue #429:
URL: https://github.com/apache/rocketmq-spring/issues/429#issuecomment-1033319631
> Merged
Thanks!
--
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: dev-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org