- Newest
- Most votes
- Most comments
Hi kevinah. The jobs/notify
and jobs/notify-next
topics are how your device gets notified that there's a job available for it to process. You need to be subscribed to get the notification. The OTA agent subscribes to jobs/notify-next
here: https://github.com/aws/ota-for-aws-iot-embedded-sdk/blob/c3bd5840979cadfe1f9505e13e49cccb87333650/source/ota_mqtt.c#L358
When the OTA agent first starts up, it subscribes to that topic and publishes a /jobs/$next/get
to get any jobs that may have been queued while it was offline.
my only concern here is that having a constantly open MQTT subscription
Subscriptions don't incur cost. Connection time and messaging do. Is there another concern?
The OTA agent includes a suspend/resume feature. This is normally used to handle intermittent connectivity. You could also use it suspend under different conditions. For example, a customer might suspend OTA when a device goes onto a cellular network and resume when it goes back on WiFi. Alternatively you might have your own custom topic that allows you to notify your application to suspend OTA (but this would require a subscription of course). More drastically, you could shutdown rather than suspend; this can unsubscribe too.
The OTA demos are worth studying if you haven't already: https://github.com/aws/aws-iot-device-sdk-embedded-C/tree/main/demos/ota
Relevant content
- asked 10 months ago
- asked a year ago
- asked 2 years ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 8 months ago
- AWS OFFICIALUpdated 5 months ago
- AWS OFFICIALUpdated 2 months ago