I am using AWS and MQTT. I have not been able to figure out why i keep getting stale, repeat MQTT messages. for instance, I changed my device shadow on AWS, and I get the new MQTT message, version 513, which is correct, but then I get message 510.
Question: Is there something in my handling of the MQTT message that I need to do to say I received the MQTT message so it doesn’t get sent again?
This is the order I receive them. You can see that timestamps for earlier versions are older.
Received: {“version”:515,“timestamp”:1730299139,“state”:{“whitelist”:[]},“metadata”:{“whitelist”:[]}}
topic: $aws/things/RichGateway/shadow/name/G2000-022512/update/delta
Received: {“version”:509,“timestamp”:1730298928,“state”:{“whitelist”:[]},“metadata”:{“whitelist”:[]}}
topic: $aws/things/RichGateway/shadow/name/G2000-022512/update/delta
Received: {“version”:512,“timestamp”:1730299045,“state”:{“whitelist”:[“PS4550-04143”]},“metadata”:{“whitelist”:[{“timestamp”:1730299045}]}}
topic: $aws/things/RichGateway/shadow/name/G2000-022512/update/delta
Received: {“version”:514,“timestamp”:1730299097,“state”:{“whitelist”:[“PS4550-04143”]},“metadata”:{“whitelist”:[{“timestamp”:1730299097}]}}
topic: $aws/things/RichGateway/shadow/name/G2000-022512/update/delta
Received: {“version”:515,“timestamp”:1730299139,“state”:{“whitelist”:[]},“metadata”:{“whitelist”:[]}}
topic: $aws/things/RichGateway/shadow/name/G2000-022512/update/delta
Received: {“version”:513,“timestamp”:1730299069,“state”:{“whitelist”:[]},“metadata”:{“whitelist”:[]}}
topic: $aws/things/RichGateway/shadow/name/G2000-022512/update/delta
Received: {“version”:510,“timestamp”:1730298953,“state”:{“whitelist”:[“PS4550-04143”]},“metadata”:{“whitelist”:[{“timestamp”:1730298953}]}}
topic: $aws/things/RichGateway/shadow/name/G2000-022512/update/delta
Get Whitelist, Code, …