-
Notifications
You must be signed in to change notification settings - Fork 11.5k
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
[#3903] Add topic validation, forbid sending message to system topic #3904
Conversation
@@ -60,6 +60,7 @@ public static void checkMessage(Message msg, DefaultMQProducer defaultMQProducer | |||
// topic | |||
Validators.checkTopic(msg.getTopic()); | |||
Validators.isNotAllowedSendTopic(msg.getTopic()); | |||
Validators.isSystemTopic(msg.getTopic()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This may affect the sending of trace messages.
rocketmq/client/src/main/java/org/apache/rocketmq/client/trace/AsyncTraceDispatcher.java
Line 386 in 7281b5d
traceProducer.send(message, new MessageQueueSelector() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are right! The topic RMQ_SYS_TRACE_TOPIC should be excluded.
…should be excluded.
Codecov Report
@@ Coverage Diff @@
## develop #3904 +/- ##
=============================================
+ Coverage 47.45% 47.53% +0.07%
- Complexity 4922 4934 +12
=============================================
Files 633 633
Lines 42498 42520 +22
Branches 5579 5582 +3
=============================================
+ Hits 20166 20210 +44
+ Misses 19826 19805 -21
+ Partials 2506 2505 -1
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
…topic (apache#3904) * Forbid sending message to system topic. * Forbid sending message to system topic.The topic RMQ_SYS_TRACE_TOPIC should be excluded.
…topic (apache#3904) * Forbid sending message to system topic. * Forbid sending message to system topic.The topic RMQ_SYS_TRACE_TOPIC should be excluded.
Make sure set the target branch to
develop
What is the purpose of the change
#3903
Brief changelog
XX
Verifying this change
XXXX
Follow this checklist to help us incorporate your contribution quickly and easily. Notice,
it would be helpful if you could finish the following 5 checklist(the last one is not necessary)before request the community to review your PR
.[ISSUE #123] Fix UnknownException when host config not exist
. Each commit in the pull request should have a meaningful subject line and body.mvn -B clean apache-rat:check findbugs:findbugs checkstyle:checkstyle
to make sure basic checks pass. Runmvn clean install -DskipITs
to make sure unit-test pass. Runmvn clean test-compile failsafe:integration-test
to make sure integration-test pass.