I am looking into Amazon IoT as a transport mechanism for mobile devices periodically measuring data (usually every N minutes, with N being anywhere between 2 and 32 minutes). With MQTT, I can utilize Amazon's broker to publish finished measurement results to subscribers with QoS=1. Let's also assume that my sole subscriber is just another device listening on wildcard topic (eg. abc/#) and storing published messages into a local database.
But now it's also possible that:
- the publishing mobile devices have spotty/bad/no connection to the cell network,
- the subscriber dies (reboots, software failure, hardware failure, maintenance, etc.)
Assuming I use the official Java SDK . What would happen to data published during these times when at least either of them is offline? Will the subscriber get all the messages it has been missing out on upon reconnect?
Also: does this depend on the protocol in question? For testing purposes, we're using WebSockets, but later development/production, we'd prefer MQTT over SSL.