This is an automated email from the ASF dual-hosted git repository.
duhengforever pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/rocketmq.git
The following commit(s) were added to refs/heads/develop by this push:
new 93edad2cb [ISSUE #4033] fix async deliver msg will resend forever when
serivce not avliable (#4045)
93edad2cb is described below
commit 93edad2cb3de29839ee0c67daf41d2b27cff30e7
Author: zhangyang <[email protected]>
AuthorDate: Wed Apr 13 10:31:23 2022 +0800
[ISSUE #4033] fix async deliver msg will resend forever when serivce not
avliable (#4045)
Signed-off-by: zhangyang21 <[email protected]>
---
.../apache/rocketmq/store/schedule/ScheduleMessageService.java | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git
a/store/src/main/java/org/apache/rocketmq/store/schedule/ScheduleMessageService.java
b/store/src/main/java/org/apache/rocketmq/store/schedule/ScheduleMessageService.java
index 82d280c30..67c328de2 100644
---
a/store/src/main/java/org/apache/rocketmq/store/schedule/ScheduleMessageService.java
+++
b/store/src/main/java/org/apache/rocketmq/store/schedule/ScheduleMessageService.java
@@ -555,7 +555,7 @@ public class ScheduleMessageService extends ConfigManager {
return;
}
log.warn("putResultProcess error, info={}",
putResultProcess.toString());
- putResultProcess.onException();
+ putResultProcess.doResend();
break;
case SKIP:
log.warn("putResultProcess skip, info={}",
putResultProcess.toString());
@@ -564,7 +564,7 @@ public class ScheduleMessageService extends ConfigManager {
}
} catch (Exception e) {
log.error("HandlePutResultTask exception. info={}",
putResultProcess.toString(), e);
- putResultProcess.onException();
+ putResultProcess.doResend();
}
}
@@ -708,7 +708,7 @@ public class ScheduleMessageService extends ConfigManager {
public void onException() {
log.warn("ScheduleMessageService onException, info: {}",
this.toString());
if (this.autoResend) {
- this.resend();
+ this.status = ProcessStatus.EXCEPTION;
} else {
this.status = ProcessStatus.SKIP;
}
@@ -726,7 +726,7 @@ public class ScheduleMessageService extends ConfigManager {
}
}
- private void resend() {
+ public void doResend() {
log.info("Resend message, info: {}", this.toString());
// Gradually increase the resend interval.