Skip to content

[ISSUE #11329] fix(example): report real send status in ProducerWithNamespace - #11343

Open
chennaji9 wants to merge 1 commit into
apache:developfrom
chennaji9:cnj/example-ns-sendstatus
Open

chennaji9 wants to merge 1 commit into
apache:developfrom
chennaji9:cnj/example-ns-sendstatus

Conversation

@chennaji9

@chennaji9 chennaji9 commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Which Issue(s) This PR Fixes

Fixes #11329

Brief Description

ProducerWithNamespace printed send success for every send that returned without throwing, but DefaultMQProducer.send can return normally with FLUSH_DISK_TIMEOUT, FLUSH_SLAVE_TIMEOUT or SLAVE_NOT_AVAILABLE — exactly the degraded-persistence cases a learner should see. The output now prints result.getSendStatus() instead of an unconditional success claim (and fixes the misId typo).

How Did You Test This Change?

mvn -pl example -am -DskipTests compile (JDK 11, PR base commit) → BUILD SUCCESS with the change. SendResult.getSendStatus() is the standard accessor used by other examples (e.g. operation/Producer.java prints the full SendResult).

…rWithNamespace

Print SendResult.getSendStatus() instead of an unconditional
'send success', so FLUSH_DISK_TIMEOUT / FLUSH_SLAVE_TIMEOUT /
SLAVE_NOT_AVAILABLE results are visible; also fix the misId typo.
@codecov-commenter

codecov-commenter commented Oct 9, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 49.69%. Comparing base (9ea2ccd) to head (d9efcb6).
⚠️ Report is 9 commits behind head on develop.

Additional details and impacted files
@@              Coverage Diff              @@
##             develop   #11343      +/-   ##
=============================================
- Coverage      49.75%   49.69%   -0.07%     
- Complexity     14354    14355       +1     
=============================================
  Files           1390     1390              
  Lines         103246   103262      +16     
  Branches       13502    13504       +2     
=============================================
- Hits           51375    51314      -61     
- Misses         45679    45743      +64     
- Partials        6192     6205      +13     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@RockteMQ-AI RockteMQ-AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Review by github-manager-bot

Summary

Fixes ProducerWithNamespace to report the real send status instead of a hardcoded value.

Findings

  • [Info] Trivial one-line fix. Reporting the actual SendResult status is the correct behavior.

Automated review by github-manager-bot

@chennaji9
chennaji9 force-pushed the cnj/example-ns-sendstatus branch from 6217a4b to d9efcb6 Compare October 18, 2026 08:10
@chennaji9

Copy link
Copy Markdown
Contributor Author

Hi @RongtongJin, gentle follow-up on this one — it has been sitting for quite a while now. Everything (local tests + CI) is green, and the change is deliberately minimal (report real send status in ProducerWithNamespace). A review would be really appreciated whenever you have time, and merging would be great if it looks reasonable. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] ProducerWithNamespace example prints "send success" for non-SEND_OK statuses

3 participants