Compare commits

..

7 Commits

Author SHA1 Message Date
RongtongJin
f5c09ac287 [maven-release-plugin] prepare release rocketmq-dashboard-2.0.0 2024-09-18 09:57:04 +08:00
Guyu
e97072a3b1 style: Remove unused imports for the checkstyle. (#232)
* fix: 5.x query message detail throw: Failed to query message by Id: xxx

* style: Remove unused imports for the checkstyle.

---------

Co-authored-by: yangzengc <yangzengc@ewan.cn>
2024-09-12 16:51:34 +08:00
Evan
6d360509c0 fix: 5.x query message detail throw: Failed to query message by Id: xxx (#231)
Co-authored-by: yangzengc <yangzengc@ewan.cn>
2024-09-07 19:59:38 +08:00
Akai
464f57adf8 Support retryMaxTimes filed set for consumer group (#229)
* fix:Fixed the issue that normal messages in version v4 are not showed

* feat:support retryMaxTimes args set

---------

Co-authored-by: yuanziwei <yuanziwei@xiaomi.com>
Co-authored-by: yuanziwei.akai <yuanziwei.akai@bytedance.com>
2024-08-27 20:30:00 +08:00
Akai
5d08d3b122 Support Unspecified Topic Add & Update & Query (#223)
* fix:Fixed the issue that normal messages in version v4 are not showed

* feat:support unspecified topic

---------

Co-authored-by: yuanziwei <yuanziwei@xiaomi.com>
2024-07-24 10:57:04 +08:00
Akai
d9fc76d3a3 fix:Fixed the issue that normal messages in version v4 are not showed (#222)
Co-authored-by: yuanziwei <yuanziwei@xiaomi.com>
2024-07-24 10:56:47 +08:00
Akai
2bc59db340 Supplement UserGuide for RocketMQ 5.0 (#208)
* Support UserGuide for new feature

* update userGuide md

* update userGuide md

---------

Co-authored-by: yuanziwei <yuanziwei@xiaomi.com>
2024-06-13 15:22:38 +08:00
11 changed files with 95 additions and 54 deletions

View File

@@ -1 +0,0 @@
target/

View File

@@ -63,6 +63,18 @@
* 根据消息主题和消息Id进行消息的查询
* 消息详情可以展示这条消息的详细信息,查看消息对应到具体消费组的消费情况(如果异常,可以查看具体的异常信息)。可以向指定的消费组重发消息。
## RocketMQ-V5.0 仪表盘
* 版本切换
* RocketMQ右上角可切换不同版本用户可以自主选择 RocketMQ-5.x 或 RocketMQ-4.x 版本
* 主题页面
* 支持延迟/顺序/事务消息的筛选
* 支持延迟/顺序/事物/普通等多种消息类型主题的新增与更新
* 消费页面
* 支持顺序消费类型订阅组的过滤
* 提供顺序消费类型订阅组的新增与更新如果需要开启顺序消费FIFO类型的订阅组一定需要打开consumeOrderlyEnable选项
* 代理页面RocketMQ 5.0新增)
* 支持代理节点的新增与查询
* 支持代理节点地址配置在application.yml中可对proxyAddr和proxyAddrs属性进行预配置
## HTTPS 方式访问Dashboard
* HTTPS功能实际上是使用SpringBoot提供的配置功能即可完成首先需要有一个SSL KeyStore来存放服务端证书可以使用本工程所提供的测试密钥库:

View File

@@ -64,6 +64,18 @@
* look over this message's detail info.you can see the message's consume state(each group has one line),show the exception message if has exception.
you can send this message to the group you selected
## RocketMQ-V5.0 dashboard
* Version switching
* RocketMQ can switch between different versions in the upper right corner, and users can freely choose between RocketMQ-5.X or RocketMQ-4.X versions
* Theme page
* Support filtering of delayed/sequential/transaction messages
* Support the addition and update of multiple message types such as delay, sequence, object, and ordinary themes
* Consumption page
* Support filtering of subscription groups for fifo consumption types
* Provide the addition and update of subscription groups for sequential consumption types. If fifo consumption needs to be enabled, FIFO type subscription groups must have the consumeOrderlyEnable option enabled
* Proxy page (Added in RocketMQ 5.0)
* Support for adding and querying proxy nodes
* Support proxy node address configuration: ProxyAddr and proxyAddrs properties can be pre configured in application.yml
## Access Dashboard with HTTPS
* SpringBoot itself has provided the SSL configuration. You can use the project test Keystore:resources/rmqcngkeystore.jks. The store is generated with the following unix keytool commands:

View File

@@ -28,14 +28,14 @@
<groupId>org.apache.rocketmq</groupId>
<artifactId>rocketmq-dashboard</artifactId>
<packaging>jar</packaging>
<version>1.0.1-SNAPSHOT</version>
<version>2.0.0</version>
<name>rocketmq-dashboard</name>
<scm>
<url>git@github.com:apache/rocketmq-dashboard.git</url>
<connection>scm:git:git@github.com:apache/rocketmq-dashboard.git</connection>
<developerConnection>scm:git:git@github.com:apache/rocketmq-dashboard.git</developerConnection>
<tag>1.0.0</tag>
<tag>rocketmq-dashboard-2.0.0</tag>
</scm>
<mailingLists>
@@ -459,7 +459,7 @@
<configuration>
<target>
<copy todir="${project.build.directory}/classes/public">
<fileset dir="${project.basedir}/frontend/build"/>
<fileset dir="${project.basedir}/frontend/build" />
</copy>
</target>
</configuration>

View File

@@ -15,16 +15,9 @@
# limitations under the License.
#
FROM maven:3.8.6-openjdk-8 AS builder
ADD . .
# package jar
RUN mvn clean package -Dmaven.test.skip=true
FROM openjdk:8u342-jdk
# copy jar from the builder stage
COPY --from=builder target/rocketmq-dashboard-*.jar rocketmq-dashboard.jar
ENTRYPOINT exec java $JAVA_OPTS -jar rocketmq-dashboard.jar
FROM java:8
VOLUME /tmp
ADD rocketmq-dashboard-*.jar rocketmq-dashboard.jar
RUN sh -c 'touch /rocketmq-dashboard.jar'
ENV JAVA_OPTS=""
ENTRYPOINT [ "sh", "-c", "java $JAVA_OPTS -jar /rocketmq-dashboard.jar" ]

View File

@@ -17,27 +17,29 @@
package org.apache.rocketmq.dashboard.service.client;
import com.google.common.base.Throwables;
import java.io.UnsupportedEncodingException;
import java.util.List;
import java.util.Map;
import java.util.Properties;
import java.util.Set;
import org.apache.rocketmq.client.QueryResult;
import org.apache.rocketmq.client.exception.MQBrokerException;
import org.apache.rocketmq.client.exception.MQClientException;
import org.apache.rocketmq.client.impl.MQAdminImpl;
import org.apache.rocketmq.common.AclConfig;
import org.apache.rocketmq.common.PlainAccessConfig;
import org.apache.rocketmq.common.TopicConfig;
import org.apache.rocketmq.remoting.protocol.admin.ConsumeStats;
import org.apache.rocketmq.remoting.protocol.admin.RollbackStats;
import org.apache.rocketmq.remoting.protocol.admin.TopicStatsTable;
import org.apache.rocketmq.common.message.MessageClientIDSetter;
import org.apache.rocketmq.common.message.MessageExt;
import org.apache.rocketmq.common.message.MessageQueue;
import org.apache.rocketmq.common.message.MessageRequestMode;
import org.apache.rocketmq.dashboard.util.JsonUtil;
import org.apache.rocketmq.remoting.RemotingClient;
import org.apache.rocketmq.remoting.exception.RemotingCommandException;
import org.apache.rocketmq.remoting.exception.RemotingConnectException;
import org.apache.rocketmq.remoting.exception.RemotingException;
import org.apache.rocketmq.remoting.exception.RemotingSendRequestException;
import org.apache.rocketmq.remoting.exception.RemotingTimeoutException;
import org.apache.rocketmq.remoting.protocol.RemotingCommand;
import org.apache.rocketmq.remoting.protocol.RequestCode;
import org.apache.rocketmq.remoting.protocol.ResponseCode;
import org.apache.rocketmq.remoting.protocol.admin.ConsumeStats;
import org.apache.rocketmq.remoting.protocol.admin.RollbackStats;
import org.apache.rocketmq.remoting.protocol.admin.TopicStatsTable;
import org.apache.rocketmq.remoting.protocol.body.BrokerReplicasInfo;
import org.apache.rocketmq.remoting.protocol.body.BrokerStatsData;
import org.apache.rocketmq.remoting.protocol.body.ClusterAclVersionInfo;
@@ -64,23 +66,20 @@ import org.apache.rocketmq.remoting.protocol.route.TopicRouteData;
import org.apache.rocketmq.remoting.protocol.statictopic.TopicQueueMappingDetail;
import org.apache.rocketmq.remoting.protocol.subscription.GroupForbidden;
import org.apache.rocketmq.remoting.protocol.subscription.SubscriptionGroupConfig;
import org.apache.rocketmq.dashboard.util.JsonUtil;
import org.apache.rocketmq.remoting.RemotingClient;
import org.apache.rocketmq.remoting.exception.RemotingCommandException;
import org.apache.rocketmq.remoting.exception.RemotingConnectException;
import org.apache.rocketmq.remoting.exception.RemotingException;
import org.apache.rocketmq.remoting.exception.RemotingSendRequestException;
import org.apache.rocketmq.remoting.exception.RemotingTimeoutException;
import org.apache.rocketmq.remoting.protocol.RemotingCommand;
import org.apache.rocketmq.tools.admin.MQAdminExt;
import org.apache.rocketmq.tools.admin.api.BrokerOperatorResult;
import org.apache.rocketmq.tools.admin.api.MessageTrack;
import org.apache.rocketmq.tools.admin.common.AdminToolResult;
import org.joor.Reflect;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;
import java.io.UnsupportedEncodingException;
import java.util.List;
import java.util.Map;
import java.util.Properties;
import java.util.Set;
import static org.apache.rocketmq.remoting.protocol.RemotingSerializable.decode;
@Service
@@ -465,15 +464,18 @@ public class MQAdminExtImpl implements MQAdminExt {
}
catch (Exception e) {
}
MQAdminImpl mqAdminImpl = MQAdminInstance.threadLocalMqClientInstance().getMQAdminImpl();
QueryResult qr = Reflect.on(mqAdminImpl).call("queryMessage", topic, msgId, 32,
MessageClientIDSetter.getNearlyTimeFromID(msgId).getTime() - 1000 * 60 * 60 * 13L, Long.MAX_VALUE, true).get();
if (qr != null && qr.getMessageList() != null && qr.getMessageList().size() > 0) {
return qr.getMessageList().get(0);
Set<String> clusterList = MQAdminInstance.threadLocalMQAdminExt().getTopicClusterList(topic);
if (clusterList == null || clusterList.isEmpty()) {
return MQAdminInstance.threadLocalMQAdminExt().queryMessage("", topic, msgId);
}
else {
return null;
for (String name : clusterList) {
MessageExt messageExt = MQAdminInstance.threadLocalMQAdminExt().queryMessage(name, topic, msgId);
if (messageExt != null) {
return messageExt;
}
}
return null;
}
@Override

View File

@@ -60,6 +60,7 @@ var en = {
"RETRY": "RETRY",
"FIFO": "FIFO",
"TRANSACTION": "TRANSACTION",
"UNSPECIFIED": "UNSPECIFIED",
"DLQ": "DLQ",
"QUANTITY":"Quantity",
"TYPE":"Type",

View File

@@ -61,6 +61,7 @@ var zh = {
"RETRY": "重试",
"FIFO": "顺序",
"TRANSACTION": "事务",
"UNSPECIFIED": "未指定",
"DLQ": "死信",
"QUANTITY":"数量",
"TYPE":"类型",

View File

@@ -48,6 +48,7 @@ module.controller('topicController', ['$scope', 'ngDialog', '$http', 'Notificati
$scope.filterDelay = false
$scope.filterFifo = false
$scope.filterTransaction = false
$scope.filterUnspecified = false
$scope.filterRetry = false
$scope.filterDLQ = false
$scope.filterSystem = false
@@ -91,6 +92,9 @@ module.controller('topicController', ['$scope', 'ngDialog', '$http', 'Notificati
$scope.$watch('filterTransaction', function () {
$scope.filterList(1);
});
$scope.$watch('filterUnspecified', function () {
$scope.filterList(1);
});
$scope.$watch('filterDelay', function () {
$scope.filterList(1);
});
@@ -137,22 +141,30 @@ module.controller('topicController', ['$scope', 'ngDialog', '$http', 'Notificati
return true
}
}
if (localStorage.getItem('isV5') && $scope.filterUnspecified) {
if (type.includes("UNSPECIFIED")) {
return true
}
}
if ($scope.filterNormal) {
if (type.includes("NORMAL")) {
return true
}
if (!localStorage.getItem('isV5') && type.includes("UNSPECIFIED")) {
return true
}
}
if ($scope.filterDelay) {
if (localStorage.getItem('isV5') && $scope.filterDelay) {
if (type.includes("DELAY")) {
return true
}
}
if ($scope.filterFifo) {
if (localStorage.getItem('isV5') && $scope.filterFifo) {
if (type.includes("FIFO")) {
return true
}
}
if ($scope.filterTransaction) {
if (localStorage.getItem('isV5') && $scope.filterTransaction) {
if (type.includes("TRANSACTION")) {
return true
}

View File

@@ -276,15 +276,6 @@
<span class="text-danger" ng-show="addAppForm.name.$error.required">编号不能为空.</span>
</div>
</div>
<!--<div class="form-group">-->
<!--<label class="control-label col-sm-4">retryMaxTimes:</label>-->
<!--<div class="col-sm-8">-->
<!--<input class="form-control" ng-model="item.subscriptionGroupConfig.retryMaxTimes"-->
<!--type="text"-->
<!--required/>-->
<!--<span class="text-danger" ng-show="addAppForm.name.$error.required">编号不能为空.</span>-->
<!--</div>-->
<!--</div>-->
<div class="form-group">
<label class="control-label col-sm-3">brokerId:</label>
<div class="col-sm-9">
@@ -293,6 +284,14 @@
<span class="text-danger" ng-show="addAppForm.name.$error.required">编号不能为空.</span>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-3">retryMaxTimes:</label>
<div class="col-sm-9">
<input class="form-control" ng-model="item.subscriptionGroupConfig.retryMaxTimes" type="text"
ng-disabled="{{!ngDialogData.writeOperationEnabled}}" required/>
<span class="text-danger" ng-show="addAppForm.name.$error.required">编号不能为空.</span>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-3">whichBrokerWhenConsumeSlowly:</label>
<div class="col-sm-9">
@@ -403,6 +402,14 @@
<span class="text-danger" ng-show="addAppForm.name.$error.required">编号不能为空.</span>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-3">retryMaxTimes:</label>
<div class="col-sm-9">
<input class="form-control" ng-model="item.subscriptionGroupConfig.retryMaxTimes" type="text"
ng-disabled="{{!ngDialogData.writeOperationEnabled}}" required/>
<span class="text-danger" ng-show="addAppForm.name.$error.required">编号不能为空.</span>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-3">whichBrokerWhenConsumeSlowly:</label>
<div class="col-sm-9">

View File

@@ -30,6 +30,8 @@
</md-checkbox>
<md-checkbox aria-label="Checkbox" ng-model="filterTransaction" class="md-primary" ng-show="rmqVersion">{{'TRANSACTION' | translate}}
</md-checkbox>
<md-checkbox aria-label="Checkbox" ng-model="filterUnspecified" class="md-primary" ng-show="rmqVersion">{{'UNSPECIFIED' | translate}}
</md-checkbox>
<md-checkbox aria-label="Checkbox" ng-model="filterRetry" class="md-primary">{{'RETRY' | translate}}
</md-checkbox>
<md-checkbox aria-label="Checkbox" ng-model="filterDLQ" class="md-primary">{{'DLQ' | translate}}