| | |
| | | |
| | | public class MqttClientCache { |
| | | public static LinkedHashMap<String, MqttClient> clientMapCache = new LinkedHashMap<>(); |
| | | public static MqttClient clientSignleCache=null; |
| | | } |
| | |
| | | @Service |
| | | @Slf4j |
| | | public class MqttPushCallback implements MqttCallback { |
| | | |
| | | |
| | | @Autowired |
| | | private DeviceMapper deviceMapper; |
| | | @Autowired |
| | |
| | | log.error("mqtt订阅开始========结束"+ JSONObject.toJSONString(config)); |
| | | return client; |
| | | } |
| | | |
| | | @Override |
| | | public MqttClient publish(MqttClient client,MqttConfig config, String topic, String param){ |
| | | log.error("mqtt发布消息========开始"+ JSONObject.toJSONString(config)+"\n"+param); |