Reputation: 846
I am building a web app that uses AWS IoT lifecycle events and logs device connection/disconnection. Using AWS IoT rules, I am sending all events to a lambda and after some validation I'm saving all lifecycle events to a DynamoDB table. I'm aware that messages may be delayed, out of order and duplicates may happen. I am validating for all these scenarios, so my connection log is as accurate as possible.
My question is: Is it possible for duplicate messages to come with a distinct timestamp? Such as a disconnection being sent twice with the same sessionIdentifier
but a different timestamp?
Upvotes: 1
Views: 497
Reputation: 596
Just some guesses
MQTT QoS 1 implies the "You might receive duplicate messages." thing. The message could be resend by one side if no ack is received from the other side. Thus, it is the same old message, and the timestamp would not change.
The timestamp field refers to the time the event occurred, not the time the message is sent. Thus, it should remain the same value.
Reference: http://docs.aws.amazon.com/iot/latest/developerguide/life-cycle-events.html
Upvotes: 1