Question about Particle.publish() execution with TTL specified

When making a Particle.publish() call like the one below, how does the specified Time To Live (TTL) value of 60 seconds affect how the code executes?

Particle.publish(eventName, data, 60, PRIVATE);

  • Does this command pause execution until it has successfully published within the 60 second timeframe? (i.e. waits for confirmation from the cloud of received publish?)
  • If it does not successfully publish during 60 seconds, does it stop attempting?
  • Does the code pause execution altogether at this command, wait 60 seconds, then publish the data?

I’m likely overthinking this one, but I haven’t found anything in the Firmware Guide that has given me a definitive answer on this. Thanks for your help!

1 Like

Hmm, how about this

Even if it was implemented, the actual intent of TTL would be the period how long the event will stay valid after it was delivered to the cloud before it vanishes and has nothing to do with the code flow.

Regarding code flow in connection with the publishing it self there are the two flags WITH_ACK and NO_ACK and also this post

Condescension aside, the statement in the manual you posted still does not definitively answer what the intention of TTL is regardless of if it is currently implemented or not. Thanks for answering my question below that. Have a great day.

Granted, that could be clearer.
However, since TTL (time-to-live) is not a term coined by Particle but widely used in similar connections (e.g. that extra clarification was traded for conciseness.

Seems we are going on 3+ years now with TTL still not implemented, does anyone know the status? I’m guessing we’re never actually going to see this feature.

@abatardi, I would not count on TTL ever being implemented.