Hi - I'm looking for general guidance on the use of shadows for syncing configuration (state via Shadow documents) between a GGC device and IoT Core. We use python and Java SDKs for connecting to the IoT Core and subscribing to/updating shadows.
We are trying to manage a concern where an update to a shadow document that occurs in the cloud is not transmitted to the device during brief disconnectivity, but the device does not know that connectivity dropped out.
Consider the following example:
- MQTT connection is established.
- Disconnect wifi/ethernet etc (connection to cloud)
- Update shadow document from the cloud
- Turn the Wi-Fi after a few seconds
Expected:
5) MQTT Connection events & Shadow change events are triggered (e.g connection resumed, shadowUpdate topic message, etc)
We are seeing that if the disconnection in #4 is short then MQTT Connection events and shadow change events do not call back.
The failure mode here is that the device thinks it has the latest shadow document, but it does not.
This seems like a general consensus issue in distributed systems and I am sure AWS has considered this issue.
Does anyone have any ideas?
Thanks
Chris
Edited by: cmutzel on Jul 21, 2021 5:56 PM