MQTT topics
The most visible breaking change introduced by thin-edge.io 1.0 is the new topic structure, which has been made more consistent and extensible with a better support for child devices and services.
Porting an extension that publishes telemetry data on the legacy tedge
topic, should not pose any difficulty:
- measurements and events can be mapped directly to the new scheme by just changing the topics
- for alarms, the severity in the topic in the old scheme must be mapped to the payload in the new scheme
- handling of child devices is now consistent for measurements, events and alarms.
Backward compatibility​
The tedge-agent running on the main device implements a compatibility layer and republishes on the new topics any message received on the legacy topics.
Thanks to this compatibility mechanism a legacy extension works out of the box with thin-edge.io 1.0.
However, this mechanism will be deprecated medium-term, and we encourage you to port any legacy extension to the new API.
Telemetry: Main device​
Here is the mapping between the legacy and new topics for the main device:
Type | Topic | Payload Changes |
---|---|---|
Measurements | Legacy
New
| No Change. If "<type>" is not provided, a default value of "ThinEdgeMeasurement" will be used. |
Events | Legacy
New
| No Change |
Alarms | Legacy
New
| The alarm severity should be set in the payload.
|
Health status | Legacy
New
|
|
Telemetry: Child device​
Here is the mapping between the legacy and new topics for a child device:
Type | Topic | Payload Changes |
---|---|---|
Measurements | Legacy
New
| No Change. If the "<type>" is not provided, a default value of "ThinEdgeMeasurement" will be used. |
Events | Legacy
New
| No Change |
Alarms | Legacy
New
| The alarm severity should be set in the payload.
|
Health status | Legacy
New
|
|