Ver código fonte

Merge branch 'develop' of gitadmin/tuoheng_air_monitor into release

tags/V1.0.1
wanjing 1 ano atrás
pai
commit
00e7ef96e2
1 arquivos alterados com 1 adições e 1 exclusões
  1. +1
    -1
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/mqtt/MqttProviderConfig.java

+ 1
- 1
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/mqtt/MqttProviderConfig.java Ver arquivo

@@ -49,7 +49,7 @@ public class MqttProviderConfig {
try {
String ip = IpUtils.getHostIp();
//创建MQTT客户端对象
client = new MqttClient(hostUrl, ip, new MemoryPersistence());
client = new MqttClient(hostUrl, ip + "@" + clientId, new MemoryPersistence());
//连接设置
MqttConnectOptions options = new MqttConnectOptions();
//是否清空session,设置false表示服务器会保留客户端的连接记录(订阅主题,qos),客户端重连之后能获取到服务器在客户端断开连接期间推送的消息

Carregando…
Cancelar
Salvar