Outbound messages
An outbound message (cloud-to-device message) in Trimble IoT refers to the message that is routed from an application to the device. Devices should have subscribed to the outbound topics to receive the outbound messages.
AWS
| Topic Format | Payload |
|---|---|
| {groupId}/{topicSuffix} | JSON (OR) plain text (OR) raw bytes - refer API spec |
!!!Note Maximum message size is 128 KB.
Wildcard characters supported for subscription are:
| Wildcard character | Matches | Notes | Example |
|---|---|---|---|
| # | All strings at and below its level in the topic hierarchy | Must be the last character in the topic filter. Must be the only character in its level of the topic hierarchy. Can be used in a topic filter that also contains the + wildcard character. | Subscribing to {groupId}/# will receive topics like {groupId}/gps, groupId/commands/location |
| + | Any string in the level that contains the character | Must be the only character in its level of the topic hierarchy. Can be used in multiple levels of a topic filter. | Subscribing to {groupId}/+/commands will receive topics like {groupId}/gps/commands, {groupId]/temperature/commands. |
Azure
| Topic Format | Payload |
|---|---|
devices/{clientId}/messages/devicebound/ (or) devices/{clientId}/messages/devicebound/{property-bag} | JSON (OR) plain text (OR) raw bytes - refer API spec |
-
property-bag: contains system and application properties.
-
Subscription Topic : devices/{clientId}/messages/devicebound/#
-
Expiry can be set for each outbound message. The minimum expiry that can be set is 60 secs, maximum is 2 days and the expiry defaults to 1 hour.
-
A device can have up to 50 messages unreceived and queued in the broker at a time i.e in pending state.
-
Maximum message size is 62 KB. The message size is inclusive of the payload and properties
-
The application can get the feedback status of the outbound message sent. The feedback status is also sent to the lifecycle delivery endpoint (Sent & Pending will not be sent as they are not terminal states). Possible Feedback Status:
- Pending - Yet to initiate outbound message
- Sent - Outbound message initiated to device
- Success - Device received the outbound message.
- Expired - Device not received the outbound message within expiry duration.
- Rejected - Device connected but not subscribed to the outbound topic and not received the outbound message.
- Abandoned - Device abandoned the outbound message (Applicable only for devices using Azure Iot Sdk)
- DeliveryCountExceeded - Delivery attempt to device exceeded as the device keep abandoning the outbound message. (Applicable only for devices using Azure Iot Sdk)
- Purged - Purged the outbound message
- DeviceMaximumQueueDepthExceeded - Outbound message failed because the device queue limit reached
- Failed - Failed to initiate outbound message
!!!Note Refer the Retry recommendations for implementing retry mechanisms.