Support DLQ topic resend message (#653)

Co-authored-by: zhangxu16 <zhangxu16@xiaomi.com>
This commit is contained in:
张旭
2021-02-25 09:28:08 +08:00
committed by GitHub
parent 7a28116bbe
commit 1fc200212c
2 changed files with 15 additions and 2 deletions

View File

@@ -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",

View File

@@ -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"