This commit is contained in:
parent
9999fd922b
commit
d4b3d86b3c
|
|
@ -108,6 +108,9 @@ public class DjiMqttClientService {
|
||||||
options.setAutomaticReconnect(config.getAutoReconnect());
|
options.setAutomaticReconnect(config.getAutoReconnect());
|
||||||
options.setCleanSession(config.getCleanSession());
|
options.setCleanSession(config.getCleanSession());
|
||||||
|
|
||||||
|
// 设置MQTT版本为5.0
|
||||||
|
options.setMqttVersion(MqttConnectOptions.MQTT_VERSION_5_0);
|
||||||
|
|
||||||
factory.setConnectionOptions(options);
|
factory.setConnectionOptions(options);
|
||||||
return factory;
|
return factory;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,7 @@ dji:
|
||||||
host: mqtt.t-aaron.com
|
host: mqtt.t-aaron.com
|
||||||
port: 10883
|
port: 10883
|
||||||
version: 5
|
version: 5
|
||||||
client-id: ThingsBoard_gateway
|
client-id: mqttx_c1c67436
|
||||||
username: admin
|
username: admin
|
||||||
password: admin
|
password: admin
|
||||||
connection-timeout: 30
|
connection-timeout: 30
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue