Greengrass Connectivity and Missed Shadow Updates

0

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:

  1. MQTT connection is established.
  2. Disconnect wifi/ethernet etc (connection to cloud)
  3. Update shadow document from the cloud
  4. 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

cmutzel
已提問 3 年前檢視次數 183 次
1 個回答
0

Spoke with Gavin at AWS today. He suggested that if using QoS=1, the Pub message on the Shadow topic should be resent until it is PUBACKed by the client on the device. This would suggest that there may be something wrong with our test configuration.

cmutzel
已回答 3 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南