Catching Missed Previous Events

Is there a way to access previous events which have occurred for a device/product via the cloud api? I can access the event stream via SSE but what about when my persistent connection goes down for lets say 10min - is there a way to get the events which have occurred during that down time?

No, events are not saved in the Particle cloud.

As you mentioned, SSE is one option, but if you miss events, such as because your SSE client is down, those are permanently lost.

Webhooks are another option. The lost events are also an issue, but for high-volume services you can put a load balancer in front of multiple servers to help mitigate this issue.

The final solution is Google pubsub. This is a type of webhook, but publishes to the Google pubsub network. The advanatge of pubsub is that unlike the Particle event system, it is guaranteed delivery, at most once. If your pubsub receiver is not running (Internet outage, server restarting, etc.), the events are stored in the Google cloud until you request them.

1 Like