Webhook is triggered even though Particle.publish() returned false

This is a known thing, but you’re best off de-duping on the server.

When you use WITH_ACK and check the result with 0.7.0 and later, a few things happen:

  • The call will block until the ACK is received, or 20 seconds, whichever is shorter.
  • If no ACK is received in 20 seconds, false is returned.

However, that publish is buffered. If the cloud subsequently reconnects, some number of buffered publishes will go out. So even though publish returned false, the publish will go out. Also, if you do this with more than one publish, they will likely arrive out of order. I’m not sure of the exact number that can be buffered.

It’s explained a bit more in the WITH_ACK section here:

1 Like