| | |
| | | }else{ |
| | | if(mqttClient != null && mqttClient.isConnected()){ |
| | | try { |
| | | mqttManager.publishMsg(mqttClient, this.result.topic, this.result.msg); |
| | | mqttManager.publishMsg(mqttClient, this.result.topic.longName(), this.result.msg); |
| | | DevStatusDealer.afterSendPubMessage(this.result.deviceId); |
| | | RtuLogDealer.log4Mqtt(this.result.deviceId, "发布消息 主题:" + this.result.topic + " 消息:" + this.result.msg); |
| | | log.info("发布MQTT消息(主题=" + this.result.topic + ")" + this.result.msg); |
| | |
| | | }finally { |
| | | mqttManager.pushMqttClient(mqttClient); |
| | | } |
| | | return false ; |
| | | if(this.result.hasResponse){ |
| | | return false ; |
| | | }else{ |
| | | return true ; |
| | | } |
| | | }else{ |
| | | //未曾连接MQTT服务器 |
| | | return this.decideRemoveNodeFromCach(now) ; |