Particle publish ttl and disconnected devices


Why my devices lose published events? I am publishing through the cloud API and I get a valid response (ok:True). The ttl of these events are large enough to counter random disconnects. Isn’t supposed for the cloud to persist those events for this ttl period so the device can read them when it connects back?



ttl (time to live, 0–16777215 seconds, default 60) !! NOTE: The user-specified ttl value is not yet implemented, so changing this property will not currently have any impact.


Hello, from what I understand the default=60 means that ttl = 60 seconds at least. Am I wrong ? Because it seems that is not implemented at all …


OK, re-reading it from a different perspective, the “user-specified” part may be misleading - I’ll change that.

Committed this reworded version just now - should go online soon


I would even re-phrase is as:

NOTE: The ttl feature is not yet implemented. Events would be lost if you haven’t subscribed to the event topic before calling publish (from the device or cloud).

I may have a different idea on what ttl means, but from what I understand, it is that messages should persist (from device to cloud and cloud to device for the ttl seconds). When saying default ttl=60, it may makes sense for you, that the firmware function signature is:

publish (const char * topic, const char * event, unsigned int ttl=60)

and that is where the default=60 comes from, but for me, it means that:

yes the messages persist for 60 seconds, but you cannot use a different value

which would not be the case, since messages do not persist at all (that is why I reported this behavior initially). Sorry for this back and forth, but I want to make sure we are on the same page.