client.setCallback(new MqttConsumerCallBack()); | client.setCallback(new MqttConsumerCallBack()); | ||||
client.connect(options); | client.connect(options); | ||||
String topic = "/v1/298dd766/environment/message"; | |||||
log.info("拓恒大气监测系统,订阅:topic={}", topic); | |||||
String topic = "$share/airmonitor/298dd766/environment/message"; | |||||
client.subscribe(topic, 0); | client.subscribe(topic, 0); | ||||
} catch (MqttException e) { | } catch (MqttException e) { | ||||
e.printStackTrace(); | e.printStackTrace(); |