fly
aijinhui
2023-12-18 4c7e2078a1439ad6fb42f8854f5f8ac1e6859cbc
ard-work/src/main/java/com/ruoyi/utils/qymqtt/newM/MessageCallback.java
@@ -20,7 +20,7 @@
import com.alibaba.fastjson.JSON;
@Slf4j
@Slf4j(topic = "mqttCar")
public class MessageCallback implements MqttCallback  {
   private SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
@@ -40,7 +40,7 @@
   @Override //消息发布者消息发布完成产生的回调
   public void deliveryComplete(IMqttDeliveryToken token) {
      log.info("deliveryComplete---------" + token.isComplete());
      log.debug("deliveryComplete---------" + token.isComplete());
      int messageId = token.getMessageId();
      String[] topics = token.getTopics();
      String clientId = token.getClient().getClientId();
@@ -50,7 +50,7 @@
         topicStr = topicStr + topic + ",";
      }
      topicStr = topicStr.substring(0, topicStr.length() - 1);
      log.info("消息发布完成,messageId="+messageId+",topics="+topicStr+",clientId="+clientId);
      log.debug("消息发布完成,messageId="+messageId+",topics="+topicStr+",clientId="+clientId);
   }
   @Override//消息订阅者收到消息后触发的回调