-
Notifications
You must be signed in to change notification settings - Fork 554
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 #19]Message track query enhancement #21
Conversation
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.
Great, this feature helps users who use custom track message topic to query message trace. 👍
I have several comments here.
- message track topic should have a default value, after this PR, each user will need at least 3 clicks when making a query message trace query (even if they use the default message track topic).
- I suggest that the message track topic should be in the message trace page but not in MsgTraceDetailDialog, and the browser can cache which topic was chosen before.
- rocketmq.config.msgTrackTopicName is useless, we can just remove it.
@@ -64,7 +64,7 @@ public Object viewTraceMessages(@RequestParam String msgId) { | |||
|
|||
@RequestMapping(value = "/viewMessageTraceGraph.query", method = RequestMethod.GET) | |||
@ResponseBody | |||
public MessageTraceGraph viewMessageTraceGraph(@RequestParam String msgId) { | |||
return messageTraceService.queryMessageTraceGraph(msgId); | |||
public MessageTraceGraph viewMessageTraceGraph(@RequestParam String msgId, @RequestParam String traceTopic) { |
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.
Is traceTopic must have? maybe we can use the default value if use don't choose the topic.
@RequestParam String traceTopic
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.
TraceTopic can be empty and system topic (RMQ_SYS_TRACE_TOPIC) is used by default.
Set<String> topics = new HashSet<>(); | ||
if (skipRetryAndDlq) { |
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.
- What will happen if both skipSysProcess and skipRetryAndDlq are true.
- maybe we can handle skipSysProcess and skipRetryAndDlq together, for example use Java lambda stream.
allTopics.getTopicList().stream().map((item)->{
...
}).filter(new Predicate<String>() {
@Override
public boolean apply(@Nullable String input) {
...
}
}).collect(Collectors.toSet());
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.
Yes, need to take into account the fact that both skipSysProcess and skipRetryAndDlq are true,I will optimize this method using stream.
In my point of view, I don't suggest putting the topic selection on the popover. It’s more appropriate to put it on the page. |
allTopics.getTopicList().clear(); | ||
allTopics.getTopicList().addAll(topics); |
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.
Trivial. (and it is not introduced by this PR, I'm OK to merge it)
can just use
allTopics.setTopicList(topics);
console.log($scope.allTopicList) | ||
for (const topic of $scope.allTopicList) { | ||
if (topic.startsWith(RETRY_GROUP_TOPIC_PREFIX) | ||
|| topic.startsWith(DLQ_GROUP_TOPIC_PREFIX)) { |
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.
👍
It’s great to delete useless system topics
What is the purpose of the change
#19
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.