Переглянути джерело

添加MQTT断开连接日志

ZhangNing 2 місяців тому
батько
коміт
83ecb5e138

+ 1 - 1
src/main/java/com/xyhy/jiaranmqttcluster/common/mqtt/MqttGetMessage.java

@@ -12,7 +12,7 @@ public class MqttGetMessage extends Common implements MqttCallback {
 
     @Override
     public void connectionLost(Throwable throwable) {
-
+        log.error("MQTT连接已经断开!");
     }
 
     @Override

+ 1 - 0
src/main/java/com/xyhy/jiaranmqttcluster/common/rabbitmq/listening/Listen_thirdPartyPush_jiaran.java

@@ -39,6 +39,7 @@ public class Listen_thirdPartyPush_jiaran {
 
                     String message = new String(body, "UTF-8");
                     log.info(message);
+                    log.info("收到Rabbit消息{}", message);
                     MqttServer.getInstance().pushlish(Common.getConfigByName("MQTT.server.Subscribe"), message);
                 }
             };