The MQTT Connectivity protocol uses the Publish/Subscribe messaging pattern where the communication between the senders (publishers) and the receivers (subscribers) is handled by a third party component (broker). Since a published message is delivered to every subscriber, which presents a problem for mass Device Management, the MQTT Device Adapter package defines a bidirectional messaging protocol, reducing the broadcast pattern to a single unique communication channel between a device and the Backend.
Topics
Publish
The following topic structure is defined by the MQTT Device Adapter:
For messages sent from the Device to the Backend:
backend/<device-type>/<device-id>/....For messages sent from the Backend to the Device:
device/<device-type>/<device-id>/<token>/....
Subscribe
The Device can either subscribe to one or more topics of concern or subscribe to a topic filter (topic that contains a wildcard character).
In order to utilize the full functionality of the protocol, subscription to the following topic filter is required:
device/<device-type>/<device-id>/<token>/#For individual topic subscriptions use the following structure:
device/<device-type>/<device-id>/<token>/....
For a full list of the defined topics visit the Messaging page in Developer Guide.
Payload
The body of all messages is predefined and formatted using JSON. For more information visit the Messaging page in Developer Guide.