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 2020/04/22 07:24:30 UTC

[GitHub] [rocketmq-client-cpp] he1016060110 opened a new issue #301: threads pool improvement

he1016060110 opened a new issue #301:
URL: https://github.com/apache/rocketmq-client-cpp/issues/301


   **FEATURE REQUEST**
   Recently I'm writing a grpc rocketmq proxy server because php/nodejs are the main languages in our company and we cannot use this sdk directly.
   I found out that this sdk will create more than 10 threads for every produce/consume client.They include at least one ConsumeTP, 4 NetworkTP and several timer thread. If I initiate multiple consumer client, I get hundreds of threads in one process,which is a disaster.
   I hope that there are threads pools for all the clients.NetworkTP and the timer threads can be used by all clients.It's more efficient.
   
   


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [rocketmq-client-cpp] ifplusor closed issue #301: Threads pool improvement

Posted by GitBox <gi...@apache.org>.
ifplusor closed issue #301:
URL: https://github.com/apache/rocketmq-client-cpp/issues/301


   


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [rocketmq-client-cpp] phaniranjan commented on issue #301: Threads pool improvement

Posted by GitBox <gi...@apache.org>.
phaniranjan commented on issue #301:
URL: https://github.com/apache/rocketmq-client-cpp/issues/301#issuecomment-633337987


   @ifplusor I have tried AsyncProducer.cpp & AsyncPushConsumer.cpp, below is the output, not sure if there is any configuration details missing
   [vectone@localhost example]$ !666
   ./AsyncProducer -n "localhost:9876" -g "TestGroup" -t "MyTopicMessage"
   nameserver: localhost:9876
   topic: MyTopicMessage
   groupname: TestGroup
   produce content: msgbody for test
   msg  count: 1
   thread count: 8
   tps_thread_ is null
   send Exception
   send Exception
   send Exception
   send Exception
   send Exception
   send Exception
   send Exception
   per msg time: 10ms
   ========================finished==============================
   tps_thread_ is null
   [vectone@localhost example]$ !667
   ./AsyncPushConsumer -n "localhost:9876" -g "TestGroup" -t "MyTopicMessage"
   nameserver: localhost:9876
   topic: MyTopicMessage
   groupname: TestGroup
   produce content: msgbody for test
   msg  count: 1
   thread count: 8
   tps_thread_ is null
   Segmentation fault (core dumped)
   [vectone@localhost example]$
   


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [rocketmq-client-cpp] he1016060110 commented on issue #301: threads pool improvement

Posted by GitBox <gi...@apache.org>.
he1016060110 commented on issue #301:
URL: https://github.com/apache/rocketmq-client-cpp/issues/301#issuecomment-618132656


   > ConsumeTP and some timer belong to Consumer, and NetworkTP and others belong to MQClientFactory. if you create all Consumer with same instance name, MQClientFactory will be reuse. Number of ConsumeTP can be set by Consumer. If you SDK in different process, it is useless.
   
   thanks,NetworkTP can be reused by using same instance name.And there are still too many threads.I am trying to figure  out what each thread is for.😂


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [rocketmq-client-cpp] ifplusor commented on issue #301: Threads pool improvement

Posted by GitBox <gi...@apache.org>.
ifplusor commented on issue #301:
URL: https://github.com/apache/rocketmq-client-cpp/issues/301#issuecomment-633336796


   @phaniranjan What example do you run?


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [rocketmq-client-cpp] phaniranjan edited a comment on issue #301: Threads pool improvement

Posted by GitBox <gi...@apache.org>.
phaniranjan edited a comment on issue #301:
URL: https://github.com/apache/rocketmq-client-cpp/issues/301#issuecomment-633332322


   Recently we tried to evaluate RocketMQ CPP client for our project, while trying to execute examples, tps_thread is null exception is thrown. while debugging tps_thread is not constructed/initialized in the code references. Is this related to any settings/configuration? Can you please provide any pointers to the usage of the client.  Any help will be appreciated.
   ![image](https://user-images.githubusercontent.com/6041380/82769770-a111e480-9e53-11ea-97da-a590dceed9a9.png)
   


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [rocketmq-client-cpp] ifplusor commented on issue #301: threads pool improvement

Posted by GitBox <gi...@apache.org>.
ifplusor commented on issue #301:
URL: https://github.com/apache/rocketmq-client-cpp/issues/301#issuecomment-617742441


   ConsumeTP and some timer belong to Consumer, and NetworkTP and others belong to MQClientFactory. if you create all Consumer with same instance name, MQClientFactory will be reuse. Number of ConsumeTP can be set by Consumer. If you SDK in different process, it is useless.


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [rocketmq-client-cpp] ifplusor commented on issue #301: threads pool improvement

Posted by GitBox <gi...@apache.org>.
ifplusor commented on issue #301:
URL: https://github.com/apache/rocketmq-client-cpp/issues/301#issuecomment-618140915


   @he1016060110 I am maintaining another branch, if you want to customize thread pool, I will give sb a hand.


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [rocketmq-client-cpp] ifplusor commented on issue #301: Threads pool improvement

Posted by GitBox <gi...@apache.org>.
ifplusor commented on issue #301:
URL: https://github.com/apache/rocketmq-client-cpp/issues/301#issuecomment-633343990


   @phaniranjan See #313 


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [rocketmq-client-cpp] ifplusor commented on issue #301: threads pool improvement

Posted by GitBox <gi...@apache.org>.
ifplusor commented on issue #301:
URL: https://github.com/apache/rocketmq-client-cpp/issues/301#issuecomment-618178615


   @he1016060110 You are right.


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [rocketmq-client-cpp] ifplusor edited a comment on issue #301: threads pool improvement

Posted by GitBox <gi...@apache.org>.
ifplusor edited a comment on issue #301:
URL: https://github.com/apache/rocketmq-client-cpp/issues/301#issuecomment-618140915


   @he1016060110 I am maintaining another branch, if you want to customize thread pool, I will give you a hand.


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [rocketmq-client-cpp] ifplusor commented on issue #301: Threads pool improvement

Posted by GitBox <gi...@apache.org>.
ifplusor commented on issue #301:
URL: https://github.com/apache/rocketmq-client-cpp/issues/301#issuecomment-633339886


   @phaniranjan This is a bug in TpsReportService::start(), please create a new issue, and I will commit a PR to resolve this bug immediately.


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [rocketmq-client-cpp] he1016060110 commented on issue #301: threads pool improvement

Posted by GitBox <gi...@apache.org>.
he1016060110 commented on issue #301:
URL: https://github.com/apache/rocketmq-client-cpp/issues/301#issuecomment-618176221


   > @he1016060110 I am maintaining another branch, if you want to customize thread pool, I will give sb a hand.
   
   Is it the branch `re_dev`


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [rocketmq-client-cpp] phaniranjan commented on issue #301: Threads pool improvement

Posted by GitBox <gi...@apache.org>.
phaniranjan commented on issue #301:
URL: https://github.com/apache/rocketmq-client-cpp/issues/301#issuecomment-633332322


   Recently we tried to evaluate RocketMQ CPP client for our project, while trying to execute examples, tps_thread is null exception is thrown. while debugging tps_thread is not constructed/initialized in the code references. Is this related to any settings/configuration? Can you please provide any pointers to the usage of the client. 
   ![image](https://user-images.githubusercontent.com/6041380/82769770-a111e480-9e53-11ea-97da-a590dceed9a9.png)
   


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [rocketmq-client-cpp] ifplusor closed issue #301: Threads pool improvement

Posted by GitBox <gi...@apache.org>.
ifplusor closed issue #301:
URL: https://github.com/apache/rocketmq-client-cpp/issues/301


   


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org