Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ISSUE #8997] Ensure there is an opportunity to send a retry message when broker no response #9137

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

gaoyf
Copy link
Contributor

@gaoyf gaoyf commented Jan 16, 2025

… response

Which Issue(s) This PR Fixes

Fixes #8997

Brief Description

当broker处于半死不活的状态时(gc,os内存不足等等原因),此时表现无法及时响应客户端的请求。
针对客户端同步发送消息,默认是带有重试策略的。可是此种情况下,客户端可能并没有重试的机会。
详见分析

How Did You Test This Change?

新增的参数sendMsgMaxTimeoutPerRequest,默认情况下不会影响现有的重试逻辑。
模拟broker暂停的情况,并针对各种情况进行了测试,情况如下:
image

RongtongJin
RongtongJin previously approved these changes Jan 17, 2025
Copy link
Contributor

@RongtongJin RongtongJin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@RongtongJin RongtongJin changed the title Ensure there is an opportunity to send a retry message when broker no response [ISSUE #8997] Ensure there is an opportunity to send a retry message when broker no response Jan 17, 2025
@RongtongJin
Copy link
Contributor

/home/runner/work/rocketmq/rocketmq/client/src/main/java/org/apache/rocketmq/client/impl/producer/DefaultMQProducerImpl.java:783:25: 'if' is not followed by whitespace. [WhitespaceAround]

@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 44.44444% with 5 lines in your changes missing coverage. Please review.

Project coverage is 48.00%. Comparing base (a275510) to head (354acbf).
Report is 2 commits behind head on develop.

Files with missing lines Patch % Lines
...mq/client/impl/producer/DefaultMQProducerImpl.java 40.00% 2 Missing and 1 partial ⚠️
...he/rocketmq/client/producer/DefaultMQProducer.java 50.00% 2 Missing ⚠️
Additional details and impacted files
@@              Coverage Diff              @@
##             develop    #9137      +/-   ##
=============================================
+ Coverage      47.98%   48.00%   +0.01%     
+ Complexity     12072    12058      -14     
=============================================
  Files           1321     1321              
  Lines          93024    93032       +8     
  Branches       11926    11928       +2     
=============================================
+ Hits           44638    44656      +18     
+ Misses         42880    42838      -42     
- Partials        5506     5538      +32     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants