mq异常日志 1

This commit is contained in:
gong
2025-11-24 16:54:07 +08:00
parent 531fc25a5c
commit 4a3c63a2aa

View File

@@ -229,11 +229,11 @@ public class MqttServerHandler extends ChannelInboundHandlerAdapter {
if ("con".equals(topic)) {
// 延迟 2 秒执行
SCHEDULER.schedule(() -> sendResponseToClient(ctx, "处理成功"), 2, TimeUnit.SECONDS);
// try {
// deviceStatusManager.sendMqMsg(content);
// } catch (Exception e) {
// log.error("发送消息异常:{}", e.getMessage());
// }
try {
deviceStatusManager.sendMqMsg(content);
} catch (Exception e) {
log.error("发送消息异常:{}", e.getMessage());
}
}
// 按QoS等级回复确认重点实现QoS2