Browse Source

修改主题

tags/V1.0.1^2
chengwang 1 year ago
parent
commit
eefaeaf6a3
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/mqtt/MqttProviderConfig.java

+ 2
- 1
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/mqtt/MqttProviderConfig.java View File

client.setCallback(new MqttConsumerCallBack()); client.setCallback(new MqttConsumerCallBack());
client.connect(options); client.connect(options);


String topic = "$share/airmonitor/298dd766/environment/message";
//String topic = "$share/airmonitor/298dd766/environment/message";
String topic = "/v1/298dd766/environment/message";
client.subscribe(topic, 0); client.subscribe(topic, 0);
} catch (MqttException e) { } catch (MqttException e) {
e.printStackTrace(); e.printStackTrace();

Loading…
Cancel
Save