| | |
| | | package com.doumee.core.mqtt.service; |
| | | |
| | | import com.doumee.core.mqtt.config.MqttConfig; |
| | | import com.doumee.service.business.DeviceService; |
| | | import com.doumee.service.business.DeviceSubcribeService; |
| | | import org.eclipse.paho.client.mqttv3.IMqttDeliveryToken; |
| | |
| | | public class MqttPushCallback implements MqttCallback { |
| | | @Autowired |
| | | private DeviceSubcribeService deviceSubcribeService; |
| | | @Autowired |
| | | private MqttConfig mqttConfig; |
| | | //接收消息回调 |
| | | @Override |
| | | public void connectionLost(Throwable cause) { |
| | | |
| | | // 连接丢失后,一般在这里面进行重连 |
| | | System.out.println("连接断开,可以做重连"); |
| | | // System.out.println("连接断开,可以做重连"); |
| | | } |
| | | |
| | | @Override |