Handling Interruptions in the cloud connection

Continuing the discussion from Offline/online events inconsistent:

I attended a very interesting form at the AWS Loft in London today. It was explaining the AWS IOT Service and there was a very interesting concept of a shadow device they have introduced to enable persistence of state for the application that is sending and receiving data from a device connected to the cloud. However, what this approach did not address was how a cloud connected device handles publishing events when offline. As I understand things if the Particle device makes a Spark.publish when the device is offline then there is an error code return as unsuccessful and that is it. Has anyone worked on an to store up and forward once back online/connected? I have seen one approach logging data to an SD card for later/periodic sending? Any ideas.