LystranG opened a new pull request, #10175:
URL: https://github.com/apache/rocketmq/pull/10175

   <!-- Please make sure the target branch is right. In most case, the target 
branch should be `develop`. -->
   
   ### Which Issue(s) This PR Fixes
   
   <!-- Please ensure that the related issue has already been created, and 
[link this pull request to that issue using 
keywords](<https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword>)
 to ensure automatic closure. -->
   
   - Fixes #10076 
   
   ### Brief Description
   
   <!-- Write a brief description for your pull request to help the maintainer 
understand the reasons behind your changes. -->
   
   该改动主要对clientSide执行 `resetOffset` 
顺序消费端进行优化,以减少等待时间(该时间内consumer是suspend状态的,应当尽快恢复)
   
   对于有序消费,`resetOffset` 不再进行强制等待10秒,而是复用顺序消费 `ProcessQueue` 的 `writeLock` 
,如果能够拿到锁,说明但当前没有其他线程持有当前的 `ProcessQueue`,可以安全执行接下来的操作,否则就等待锁释放(上限10s,与原本的逻辑一致)
   
   对于并发消费目前是与原来相同的逻辑,即等待10s。目前的想法是在 `ProcessQueue` 
中定义一个计数变量,用于记录当前持有的线程数,但是会导致代码侵入,需要对 `ConsumeMessageConcurrentlyService` 
进行修改。如果允许,我可以继续完成这一部分。
   
   ### How Did You Test This Change?
   
   <!-- In order to ensure the code quality of Apache RocketMQ, we expect every 
pull request to have undergone thorough testing. -->
   
   client中补充了几组单元测试,并测试通过
   
   <img width="1170" height="340" alt="image" 
src="https://github.com/user-attachments/assets/6cb0f774-a92c-4881-843f-200ad961cb34";
 />
   
   
   


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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to