优化处理,避免重复异常消息入库
This commit is contained in:
@@ -105,8 +105,11 @@ public class AppAutoDataConsumer extends EnhanceConsumerMessageHandler<AppAutoDa
|
|||||||
exceptionMsg = exceptionMsg.substring(0,180);
|
exceptionMsg = exceptionMsg.substring(0,180);
|
||||||
}
|
}
|
||||||
rocketmqMsgErrorLog.setRecord(exceptionMsg);
|
rocketmqMsgErrorLog.setRecord(exceptionMsg);
|
||||||
//单次消费异常
|
//如果是当前消息重试的则略过
|
||||||
rocketMqLogFeignClient.add(rocketmqMsgErrorLog);
|
if(!message.getSource().startsWith(EnhanceMessageConstant.RETRY_PREFIX)){
|
||||||
|
//单次消费异常
|
||||||
|
rocketMqLogFeignClient.add(rocketmqMsgErrorLog);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
rocketmqMsgErrorLog.setRecord("重试消费" + super.getMaxRetryTimes() + "次,依旧消费失败。");
|
rocketmqMsgErrorLog.setRecord("重试消费" + super.getMaxRetryTimes() + "次,依旧消费失败。");
|
||||||
//重试N次后,依然消费异常
|
//重试N次后,依然消费异常
|
||||||
|
|||||||
Reference in New Issue
Block a user