0

I would like to send data from a mobile phone to AWS IoT Core and from there to TimeStream but I must know that the data is 100% there, even in the case of Internet disconnections.

As a precaution, I thought of maintaining a local database on the mobile and seeking a mechanism where, upon successful receipt of an MQTT message by AWS TimeStream, an acknowledgment (ACK) will be provided. This would enable me to locally mark the specific data as "SENT."

As an alternative approach, if a message fails to be received, I want to receive an error notification. This would enable us to detect unsent messages and arrange for their transmission at a later time.

One option is to assign a unique ID to each MQTT message and periodically synchronize with the cloud. However, I'm interested in a more intuitive solution.

Unfortunately, I did not find any Ack or Expection messages when sending data to TimeStream

user829174
  • 6,132
  • 24
  • 75
  • 125
  • Have you tried a nonce or sequence number? All messages you send should have a sequence number that the server will assure is sane, if a message fails and the server receives the next sequence number, it'll deny the message with the sequence number missing, then you can use your local cache to send both the missing message and the new one. – Eduardo Elias Saléh Aug 16 '23 at 12:56

0 Answers0