[
https://issues.apache.org/jira/browse/TUBEMQ-345?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Guocheng Zhang resolved TUBEMQ-345.
-----------------------------------
Fix Version/s: 0.6.0
Resolution: Fixed
> 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
> Assignee: Guocheng Zhang
> Priority: Major
> Labels: pull-request-available
> Fix For: 0.6.0
>
> Attachments: screenshot-1.png, screenshot-2.png
>
> Time Spent: 20m
> Remaining Estimate: 0h
>
> 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)