You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tubemq.apache.org by "Guocheng Zhang (Jira)" <ji...@apache.org> on 2020/09/12 07:09:00 UTC
[jira] [Created] (TUBEMQ-345) Optimize the call logic of
getMessage() in Pull mode
Guocheng Zhang created TUBEMQ-345:
-------------------------------------
Summary: Optimize the call logic of getMessage() in Pull mode
Key: TUBEMQ-345
URL: https://issues.apache.org/jira/browse/TUBEMQ-345
Project: Apache TubeMQ
Issue Type: Improvement
Reporter: Guocheng Zhang
When the business thread calls getMessage() in the pull mode, if the current client does not have a free partition, the function will return immediately. At this time, the thread needs to control the sleep time by itself to avoid frequent calls to the function but no free partition consumption, causing the CPU to surge. This call logic can be optimized, that is, we can check in getMessage and let the business control check how long it has not met the requirements before returning, reducing the complexity of the business use.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)