mirror of
https://github.com/apache/rocketmq-dashboard.git
synced 2026-02-17 17:35:41 +08:00
Support DLQ topic resend message (#653)
Co-authored-by: zhangxu16 <zhangxu16@xiaomi.com>
This commit is contained in:
@@ -165,7 +165,20 @@ module.controller('messageController', ['$scope', 'ngDialog', '$http','Notificat
|
||||
|
||||
module.controller('messageDetailViewDialogController',['$scope', 'ngDialog', '$http','Notification', function ($scope, ngDialog, $http,Notification) {
|
||||
|
||||
$scope.resendMessage = function (msgId,topic,consumerGroup) {
|
||||
$scope.resendMessage = function (messageView,consumerGroup) {
|
||||
var topic = messageView.topic;
|
||||
var msgId = messageView.msgId;
|
||||
console.log('==='+topic+'==='+msgId);
|
||||
if (topic.startsWith('%DLQ%')) {
|
||||
if (messageView.properties.hasOwnProperty("RETRY_TOPIC")) {
|
||||
topic = messageView.properties.RETRY_TOPIC;
|
||||
}
|
||||
if (messageView.properties.hasOwnProperty("ORIGIN_MESSAGE_ID")) {
|
||||
msgId = messageView.properties.ORIGIN_MESSAGE_ID;
|
||||
}
|
||||
|
||||
}
|
||||
console.log('==='+topic+'==='+msgId);
|
||||
$http({
|
||||
method: "POST",
|
||||
url: "message/consumeMessageDirectly.do",
|
||||
|
||||
@@ -236,7 +236,7 @@
|
||||
<td class="text-center">{{item.trackType}}</td>
|
||||
<td class="text-center">
|
||||
<button class="btn btn-raised btn-sm btn-primary" type="button"
|
||||
ng-click="resendMessage(ngDialogData.messageView.msgId,ngDialogData.messageView.topic,item.consumerGroup)">
|
||||
ng-click="resendMessage(ngDialogData.messageView,item.consumerGroup)">
|
||||
Resend Message
|
||||
</button>
|
||||
<button class="btn btn-raised btn-sm btn-primary" type="button"
|
||||
|
||||
Reference in New Issue
Block a user