Spark.publish stack


When the device is offline or unable to publish an event using Spark.publish() does it push it on a stack and pop it off the stack the next time it’s able to publish or does it just ignore it and skip any published events that were unable to send?


As far as I’m aware, it won’t send the event when no connection is available. That might change in the future, with possible queuing of events/function/variable calls on the cloud.

@kalinchuk, event queuing at the server is absolutely on the (near) radar for @Dave. It is a highly requested functionality. I believe he is planning on working on that once the new Photon firmware is released to the IDE. :smile:


@peekay123 Great, thanks for the info. Is there something I can follow to be notified when it has been implemented?

@kalinchuk, wish there was but no, not for now. However, since this will be HUGE, you can expect an announcement by Particle when it happens. :wink:


The new photon auto-update behavior will use command / message queuing, and will serve as a soft-rollout of that feature. There will be a TON of documentation and examples for this feature when it’s more widely released, since it will require some new thinking about interacting with your devices. :slight_smile: