feat:【IoT 物联网】更新设备消息处理逻辑,重构 MQTT 下行消息处理器,优化主题构建和消息发布流程
This commit is contained in:
@@ -23,15 +23,13 @@ public enum IotDeviceMessageMethodEnum implements ArrayValuable<String> {
|
||||
STATE_OFFLINE("thing.state.offline", true),
|
||||
|
||||
// ========== 设备属性 ==========
|
||||
// 可参考 https://help.aliyun.com/zh/iot/user-guide/device-properties-events-and-services
|
||||
// TODO @haohao:使用 report 哈;
|
||||
// 可参考
|
||||
// https://help.aliyun.com/zh/iot/user-guide/device-properties-events-and-services
|
||||
PROPERTY_POST("thing.property.post", true),
|
||||
PROPERTY_REPORT("thing.property.report", true),
|
||||
|
||||
PROPERTY_SET("thing.property.set", false),
|
||||
PROPERTY_GET("thing.property.get", false),
|
||||
|
||||
//
|
||||
// ========== 设备事件 ==========
|
||||
EVENT_POST("thing.event.post", true),
|
||||
|
||||
;
|
||||
|
||||
|
||||
@@ -25,9 +25,9 @@ public class IotDeviceMessage {
|
||||
public static final String MESSAGE_BUS_DEVICE_MESSAGE_TOPIC = "iot_device_message";
|
||||
|
||||
/**
|
||||
* 【消息总线】设备消息 Topic,由 iot-biz 发送给 iot-gateway 的某个 “server”(protocol) 进行消费
|
||||
* 【消息总线】设备消息 Topic,由 iot-biz 发送给 iot-gateway 的某个 "server"(protocol) 进行消费
|
||||
*
|
||||
* 其中,%s 就是该“server”(protocol) 的标识
|
||||
* 其中,%s 就是该"server"(protocol) 的标识
|
||||
*/
|
||||
public static final String MESSAGE_BUS_GATEWAY_DEVICE_MESSAGE_TOPIC = MESSAGE_BUS_DEVICE_MESSAGE_TOPIC + "_%s";
|
||||
|
||||
@@ -92,7 +92,7 @@ public class IotDeviceMessage {
|
||||
*/
|
||||
private String msg;
|
||||
|
||||
// ========== 基础方法:只传递“codec(编解码)字段” ==========
|
||||
// ========== 基础方法:只传递"codec(编解码)字段" ==========
|
||||
|
||||
public static IotDeviceMessage requestOf(String method) {
|
||||
return requestOf(null, method, null);
|
||||
|
||||
Reference in New Issue
Block a user