Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Enhancement] When there are too many consumers and there are too many RocketMQ client threads #9035

Open
1 task done
imgoby opened this issue Dec 7, 2024 · 5 comments
Open
1 task done

Comments

@imgoby
Copy link

imgoby commented Dec 7, 2024

Before Creating the Enhancement Request

  • I have confirmed that this should be classified as an enhancement rather than a bug/feature.

Summary

When there are too many consumers and there are too many RocketMQ client threads, details:
NettyClientWorkerThread_1: 4746 threads
Client House Keeping Service: 2373 threads
CleanExpireMsgSchechedThread_: 4378 threads
RebalanceServic: 2373 threads
NettyClientSele: 2373 threads

How to resolve?

Motivation

reduce threads, reduce memory.

Describe the Solution You'd Like

Merge timers, schedule executor

Describe Alternatives You've Considered

Merge timers, schedule executor

Additional Context

No response

@imgoby imgoby changed the title [Enhancement] Enhancement title [Enhancement] When there are too many consumers and there are too many RocketMQ client threads Dec 7, 2024
@yx9o
Copy link
Contributor

yx9o commented Dec 10, 2024

Hi, I want to know how the client is used. Will multiple consumers be created in the same process?

@imgoby
Copy link
Author

imgoby commented Dec 10, 2024

yes. in the same process. it is a rocketmq client. the process is a java application using springboot+rocketmq
For example, there is a topic: hello_topic, Then there were 3000 consumers who consumed the topic according to the conditions and found that the process memory occupied 10G

@yx9o
Copy link
Contributor

yx9o commented Dec 10, 2024

Is instanceName set?

@imgoby
Copy link
Author

imgoby commented Dec 10, 2024

No, can this parameter solve it?

@Yelijah
Copy link

Yelijah commented Dec 10, 2024

Rocketmq grpc client will create a thread pool for every consumer or producer. So I modify the client source code to fix this problem。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants