[
https://issues.apache.org/jira/browse/TUBEMQ-345?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17195839#comment-17195839
]
ASF subversion and git services commented on TUBEMQ-345:
--------------------------------------------------------
Commit 2348b77fe70fa63ba0de5c85cbfb085a8820bb19 in incubator-tubemq's branch
refs/heads/master from gosonzhang
[ https://gitbox.apache.org/repos/asf?p=incubator-tubemq.git;h=2348b77 ]
[TUBEMQ-345]Optimize the call logic of getMessage() in Pull mode (#261)
Co-authored-by: gosonzhang <[email protected]>
> 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
> 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)