[Java] Fix to use correct logger class in CompositedMessageInterceptor - #1330
Open
mns-one wants to merge 1 commit into
Open
[Java] Fix to use correct logger class in CompositedMessageInterceptor#1330mns-one wants to merge 1 commit into
mns-one wants to merge 1 commit into
Conversation
RockteMQ-AI
approved these changes
Aug 11, 2026
RockteMQ-AI
left a comment
There was a problem hiding this comment.
Summary
Trivial one-line fix: the logger in CompositedMessageInterceptor was incorrectly using MessageInterceptor.class (the interface) instead of CompositedMessageInterceptor.class (the actual class). This corrects the logger category for proper log filtering. LGTM.
Automated review by github-manager-bot
RockteMQ-AI
reviewed
Aug 12, 2026
RockteMQ-AI
left a comment
There was a problem hiding this comment.
Review Summary
This PR fixes the logger class in CompositedMessageInterceptor from the interface (MessageInterceptor.class) to the implementation class (CompositedMessageInterceptor.class).
Findings
- [Warning] CompositedMessageInterceptor.java:30 — The logger was initialized with the wrong class, causing all log output to be routed to the interface's logger name instead of the implementation's. This makes per-class log level configuration ineffective and error tracing misleading.
- [Info] The fix is a simple one-line change that correctly uses
CompositedMessageInterceptor.class.
Overall
Good fix for logger configuration. This is a common mistake when implementing interfaces, and it's important for debugging and log level management.
Automated review by RockteMQ-AI
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
CompositedMessageInterceptorandMessageMeterInterceptorboth implementMessageInterceptorinterfaceLogger in
MessageMeterInterceptorwas initialized withMessageMeterInterceptor.classbut logger inCompositedMessageInterceptorwas initialized withMessageInterceptor.class(the interface) instead ofCompositedMessageInterceptor.classThis routed all log output to the wrong logger name, making per-class log level configuration ineffective and error tracing misleading.
Changes
Replaced
MessageInterceptor.classwithCompositedMessageInterceptor.class