未验证 提交 84346587 编写于 作者: 张旭 提交者: GitHub

[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: Nzhangxu16 <zhangxu16@xiaomi.com>
上级 4b7a90a3
...@@ -197,6 +197,7 @@ public class SendMessageProcessor extends AbstractSendMessageProcessor implement ...@@ -197,6 +197,7 @@ public class SendMessageProcessor extends AbstractSendMessageProcessor implement
response.setRemark("topic[" + newTopic + "] not exist"); response.setRemark("topic[" + newTopic + "] not exist");
return CompletableFuture.completedFuture(response); return CompletableFuture.completedFuture(response);
} }
msgExt.setDelayTimeLevel(0);
} else { } else {
if (0 == delayLevel) { if (0 == delayLevel) {
delayLevel = 3 + msgExt.getReconsumeTimes(); delayLevel = 3 + msgExt.getReconsumeTimes();
...@@ -358,6 +359,7 @@ public class SendMessageProcessor extends AbstractSendMessageProcessor implement ...@@ -358,6 +359,7 @@ public class SendMessageProcessor extends AbstractSendMessageProcessor implement
); );
msg.setTopic(newTopic); msg.setTopic(newTopic);
msg.setQueueId(queueIdInt); msg.setQueueId(queueIdInt);
msg.setDelayTimeLevel(0);
if (null == topicConfig) { if (null == topicConfig) {
response.setCode(ResponseCode.SYSTEM_ERROR); response.setCode(ResponseCode.SYSTEM_ERROR);
response.setRemark("topic[" + newTopic + "] not exist"); response.setRemark("topic[" + newTopic + "] not exist");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册