MQTT is a great choice if the application requires the following:
- Transmission of data between devices or from device to a server
- Reliability of data transfer
- Capability to scale
- Compatibility with low-power devices
- Robust for unreliable Internet connections
It sounds like your application has these requirements and that MQTT would be a sufficient solution.
The arduino might lose connection to wifi intermitently, when the devices are taken outside away from home wifi.
MQTT uses different packets to accomplish different tasks, such as connecting to the server.
According to the documentation, "If the Server does not receive a CONNECT packet within a reasonable amount of time after the Network Connection is established, the Server SHOULD close the Network Connection."
None of the data will be sent when there is no ACK acknowledgment of the connection. Then, via the CONNECT packets, the client will also reconnect automatically to the server when back in wifi range.
You can adjust the quality of service (QoS) to three different levels in MQTT to ensure that all of your data is received by the server:
- QoS 0 "At most Once" is the default and provides no assurance that the message is received by the server.
- QoS 1 "At least Once" continues to send the message until receipt is acknowledged. There is a possibility of duplicate messages being sent
- QoS 2 "Exactly Once" ensures that a message is sent without the risk of duplicates.
The data would most likely just be integers
MQTT supports a maximum payload size of 256 MB and is more than sufficient to support transmission of integers.
we would only need to send a message every minute or so
MQTT is ideal for contexts when network bandwidth is at a premium. 1 message per minute is very low bandwidth considering you are only sending integers and assuming you are not sending 256MB of integers at a time.
collect data and which we will then be able to view and manipulate... it would make more sense to send the data to a database server of some kind