ThingsBoard IoT Gateway MQTT Connector Configuration Part 2

mapping part

This configuration section contains the array of topics the gateway subscribes to after connecting to the proxy server, and the settings (converters) for handling incoming messages.

parameter Defaults describe
topicFilter /sensor/data Subscribed topic address
example name Topic Topic filtering load Remark
Example 1 /sensor/data /sensor/data {“serialNumber”: “SN-001”, “sensorType”: “Thermometer”, “sensorModel”: “T1000”, “temp”: 42, “hum”: 58} The device name is part of the payload
Example 2 /sensor/SN-001/data /sensor/+/data {“sensorType”: “Thermometer”, “sensorModel”: “T1000”, “temp”: 42, “hum”: 58} The device name is part of the topic

In this case, the following messages are valid:

Example 1:

mosquitto_pub -h YOUR_MQTT_BROKER_HOST -p YOUR_MQTT_BROKER_PORT -t "/sensor/data" -m '{"serialNumber": "SN-001", "sensorType": "The

Guess you like

Origin blog.csdn.net/github_35631540/article/details/131455916