异常处理

yun-zuoyi
wei.peng 6 years ago
parent 95fba8e7f7
commit dd8f5bd900

@ -63,7 +63,7 @@ public class MessageMailQueueReceiver {
mailUtil.setSubject(msg.getMessageTitle());
mailUtil.setContentType(ImppEnumUtil.MESSAGE_TYPE_CONTENT.valueOfDescription(msg.getMessageContentType()));
mailUtil.setBody(msg.getMessageContent());
if(msg.getMessageReceiverType() != null){
if (msg.getMessageReceiverType().intValue() == ImppEnumUtil.MESSAGE_RECEIVER_TYPE.URGENT.getValue()) {
// 判断是否为系统紧急提示 微服注册状态提示
mailUtil.setTo(sysConfigService.getSysConfigByCode(PlatformConstWords.CONTACT_MAIL).getConfigValue());
@ -106,8 +106,11 @@ public class MessageMailQueueReceiver {
msg.setMessageReceiversNameRdd(StringUtils.join(receiverName, ","));
sysMessageService.updateSysMessage(msg);
}
}
//信息已处理
channel.basicAck(message.getMessageProperties().getDeliveryTag(), false);
}catch (NullPointerException e){
LOGGER.error(e.getMessage());
} catch (Exception e) {
LOGGER.error("【MQ-IMPP_MESSAGE_MAIL_QUEUE】处理出错{}",e.getMessage(),e);
//丢弃这条消息

Loading…
Cancel
Save