Inbound messages
In Trimble IoT, inbound messages refer to the data or messages that are sent from the devices.
AWS
A device can send inbound messages to the gateway through topics. The topic should be of the following format:
| Format | Description |
|---|---|
| Topic Format | {groupId}/{topicSuffix} |
| Payload | Valid JSON |
-
groupId - Unique identifier of the Group to which the device belongs to.
-
topicSuffix - It can be any number of strings separated by forward slash (/). Example: c0edb58d-835d-4f2d-be1e-97f79f6e7160/gps, c0edb58d-835d-4f2d-be1e-97f79f6e7160/command/location
-
Payload can be up to 128 KB size.
-
Supported QoS levels - 0,1
-
A topic in a publish request can have no more than 7 forward slashes (/).
Azure
A device can send inbound messages to the gateway through topics. The topic should be of the following format:
| Topic Format | devices/{clientId}/messages/events/ (or) devices/{clientId}/messages/events/{property-bag} {groupId}/{topicSuffix} |
|---|---|
| Payload | Valid JSON |
-
clientId: ClientId of the Device
-
Property Bag: Devices can set system and application properties to the property bag. These properties are key value pairs. The content in the property bag should be in URL-encoded format.
-
System Properties:
Exampledevices/{clientId}/messages/events/**$.ct=application%2Fjson&$.ce=utf-8&location=us**- ContentType (
$.ct) takes only “application/json”. - ContentEncoding
($.ce) allowed values are UTF-8, UTF-16, UTF-32 - The following system property (
$.ct=application%2Fjson%3Bcharset%3Dutf-8) is required in order to route the messages based on the message body to event hubs. The messages will not be delivered if the system property is not added.
devices/{clientId}/messages/events/**$.ct=application%2Fjson%3Bcharset%3Dutf-8** - ContentType (
-
Application properties
Example Topic
devices/{clientId}/messages/events/**$.ct=application%2Fjson&messageType=sensedEvent&location=us** -
Payload can be up to ~256 KB size. The properties are inclusive of payload size.
-
Supported QoS levels : 0,1