产品动态
${productId}/house_monitor/thermometer,即可将满足规则的消息转发到这个 Topic。${productId}/${house}/device,其中用 ${} 括起来的 house 就代表一个变量名,这个变量名是 SELECT 语句中选取出来的字段内容。SELECT temperature as t, houseFROM house_monitor/thermometer/getWHERE house="tencent" AND temperature > 40
t 和 house 这两个字段的值,假定 house 字段的内容为 tencent。
此时如果定义了转发给 house_monitor/${house}/app这个 Topic,那么规则引擎则会将这个 Topic 中的 ${house} 变量替换为 "tencent", 从而将 t 和 house 的字段内容发送给 house_monitor/tencent/app` 这个 Topic。

文档反馈