I am building a small IoT system using a Raspberry Pi. On one side a sensor on the other side the cloud for data storage. Between the Cloud and the pi there is a WiFi link. This link is not stable, it can be offline for hours or even days. However, I need to establish a link so at the end there is no missing data in the cloud.
What is the best (communication) protocol to tackle this. I like to have a system that reconnect automatically and start sending data the moment there is WiFi connection. If the data is stored in the cloud the buffer must be deleted. Is MQTT a way to go? Are there other appoaches?