Skip to content

[ISSUE #10728] Avoid raw POP message logs - #10729

Open
Aias00 wants to merge 1 commit into
apache:developfrom
Aias00:fix/proxy-consumer-messageext-log-summary
Open

[ISSUE #10728] Avoid raw POP message logs#10729
Aias00 wants to merge 1 commit into
apache:developfrom
Aias00:fix/proxy-consumer-messageext-log-summary

Conversation

@Aias00

@Aias00 Aias00 commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Summary

  • replace direct MessageExt logging in ConsumerProcessor POP error paths with a compact message summary
  • keep topic, msgId, queue, offsets, body size, and property keys while omitting body bytes and property values
  • add a targeted test for the summary helper

Fixes #10728

Tests

  • JAVA_HOME=$(/usr/libexec/java_home -v 1.8) mvn -pl proxy -Dtest=ConsumerProcessorTest clean test

Copilot AI review requested due to automatic review settings July 31, 2026 12:39

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 42.85714% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 48.22%. Comparing base (00e45b8) to head (2eaf5a8).

Files with missing lines Patch % Lines
...he/rocketmq/proxy/processor/ConsumerProcessor.java 42.85% 5 Missing and 3 partials ⚠️
Additional details and impacted files
@@              Coverage Diff              @@
##             develop   #10729      +/-   ##
=============================================
- Coverage      48.31%   48.22%   -0.09%     
+ Complexity     13511    13483      -28     
=============================================
  Files           1380     1380              
  Lines         101091   101103      +12     
  Branches       13101    13103       +2     
=============================================
- Hits           48844    48761      -83     
- Misses         46285    46356      +71     
- Partials        5962     5986      +24     

☔ 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

Replaces raw MessageExt toString() logging in ConsumerProcessor.filterPopResult error paths with a compact summary, preventing body/property data leakage in logs.

Findings

  • [Info] Both replaced log sites (handle-null error and filterMessage failure) correctly use the summary helper instead of the raw object.
  • [Info] The summarizeMessageExt implementation is identical to the one in PR #10731 (LocalMessageService).

Suggestions

  • Code duplication: The same summarizeMessageExt method appears in both ConsumerProcessor (this PR) and LocalMessageService (PR #10731). Consider extracting it into a shared utility class to keep a single source of truth. This would also apply to any future similar PRs in the series.
  • Test coverage is solid — verifies that body bytes and property values are excluded while key metadata is preserved.

Automated review by github-manager-bot

@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

Replaces raw MessageExt.toString() in ConsumerProcessor error/warn logs with a summarizeMessageExt() summary to avoid dumping full message content.

Findings

  • [Info] ConsumerProcessor.java:191,238 — Two log sites updated to use summary instead of raw object. Both are error paths where full message dumps would be noisy.
  • [Info] ConsumerProcessor.java:248-259 — summarizeMessageExt() implementation is identical to the one in PR #10731 (LocalMessageService). Consider extracting to a shared utility.
  • [Info] Test coverage is present.

Cross-repo Note

Same summarizeMessageExt() as PR #10731. After both merge, a shared utility in common or proxy module would reduce maintenance burden.


Automated review by github-manager-bot

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.

Avoid logging raw MessageExt bodies in proxy ConsumerProcessor

4 participants