@@ -1,6 +1,5 @@ | |||
package com.tuoheng.admin.mqtt; | |||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | |||
import com.tuoheng.admin.mqtt.consumer.MqttConsumerCallBack; | |||
import com.tuoheng.common.core.utils.IpUtils; | |||
import lombok.extern.slf4j.Slf4j; | |||
@@ -75,8 +74,9 @@ public class MqttProviderConfig { | |||
client.setCallback(new MqttConsumerCallBack()); | |||
client.connect(options); | |||
client.subscribe("$share/g1/v1/298dd766/environment/message", 0); | |||
String topic = "/v1/298dd766/environment/message"; | |||
log.info("拓恒大气监测系统,订阅:topic={}", topic); | |||
client.subscribe(topic, 0); | |||
} catch (MqttException e) { | |||
e.printStackTrace(); | |||
} |
@@ -115,7 +115,7 @@ spring: | |||
password: public | |||
#客户端id(不能重复) | |||
client: | |||
id: tuoheng-airmonitor-consumer-id | |||
id: tuoheng-airmonitor-id | |||
#MQTT默认的消息推送主题,实际可在调用接口是指定 | |||
default: | |||
topic: topic |
@@ -126,7 +126,7 @@ spring: | |||
password: | |||
#客户端id(不能重复) | |||
client: | |||
id: tuoheng-airmonitor-consumer-id | |||
id: tuoheng-airmonitor-id | |||
#MQTT默认的消息推送主题,实际可在调用接口是指定 | |||
default: | |||
topic: topic |
@@ -115,7 +115,7 @@ spring: | |||
password: admin##123 | |||
#客户端id(不能重复) | |||
client: | |||
id: tuoheng-airmonitor-consumer-id | |||
id: tuoheng-airmonitor-id | |||
#MQTT默认的消息推送主题,实际可在调用接口是指定 | |||
default: | |||
topic: topic |
@@ -116,7 +116,7 @@ spring: | |||
password: admin##123 | |||
#客户端id(不能重复) | |||
client: | |||
id: tuoheng-airmonitor-consumer-id | |||
id: tuoheng-airmonitor-id | |||
#MQTT默认的消息推送主题,实际可在调用接口是指定 | |||
default: | |||
topic: topic |