From 8434658798ad5a77f9f2137c72a82b157dab5398 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E6=97=AD?= Date: Sat, 11 Sep 2021 17:21:50 +0800 Subject: [PATCH] [ISSUE #2724] Resend message to DLQ directly when max reconsume times reach (#3318) * [Store] Resend message directly to DLQ when max reconsume times reach * set msg delaylevel=0 when topic is DLQ Co-authored-by: zhangxu16 --- .../apache/rocketmq/broker/processor/SendMessageProcessor.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/broker/src/main/java/org/apache/rocketmq/broker/processor/SendMessageProcessor.java b/broker/src/main/java/org/apache/rocketmq/broker/processor/SendMessageProcessor.java index a76c144c..1b1cf4ba 100644 --- a/broker/src/main/java/org/apache/rocketmq/broker/processor/SendMessageProcessor.java +++ b/broker/src/main/java/org/apache/rocketmq/broker/processor/SendMessageProcessor.java @@ -197,6 +197,7 @@ public class SendMessageProcessor extends AbstractSendMessageProcessor implement response.setRemark("topic[" + newTopic + "] not exist"); return CompletableFuture.completedFuture(response); } + msgExt.setDelayTimeLevel(0); } else { if (0 == delayLevel) { delayLevel = 3 + msgExt.getReconsumeTimes(); @@ -358,6 +359,7 @@ public class SendMessageProcessor extends AbstractSendMessageProcessor implement ); msg.setTopic(newTopic); msg.setQueueId(queueIdInt); + msg.setDelayTimeLevel(0); if (null == topicConfig) { response.setCode(ResponseCode.SYSTEM_ERROR); response.setRemark("topic[" + newTopic + "] not exist"); -- GitLab