Is hook-response delivery guaranteed?

I’m troubleshooting an intermittent problem where I see the hook-response in the Console / Events but yet my device acts like it does not get the hook-response.

In the documentation I read this:

Events, and therefore webhooks, do not have guaranteed end-to-end delivery.

which made me wonder if a hook-response is just an Event from the cloud and not guaranteed to get to my device. If that is true it explains everything.

Can anyone with knowledge on the subject comment on this?

The hook-response is just an event and therefore also is only best-effort to deliver.

There are three retries at the CoAP level, but after that the event is discarded.

1 Like

@rickkas7: So, if my Argon publishes an event to a webhook which results in a webhook response, but then the Argon goes offline to the Particle cloud just prior to the hook response being sent back to the device, could the three tries happen within a few seconds while the device is re-connecting to the Internet? How long does the Cloud wait between the three retries and does the Cloud test to see if the device is online and hold off sending the event back to the device until it is online?

The three retries have a back-off, so it should take at least 20 seconds, possibly a bit longer.

Because all devices (except the Photon and P1) use UDP to communicate with the device, the only way the cloud knows the device is offline is that it has not communicated with the device for a while.

For cellular devices, this is approximately 2 * 23 minutes (2 times the keep-alive).

For the Argon, it’s 2 * 30 seconds (1 minute), prior to 2.1.0, and 2 * 25 seconds for 2.1.0 and later.

Thus while retrying the transmission in your scenario, it will just be retrying because the cloud won’t know for sure if the device is offline yet.

1 Like

Thanks for this important information. Just to make sure that I understand this correctly: If my Argon publishes to the cloud and then goes offline just before the first transmission of the hook response back to the Argon, then this hook response will be missed. There will be a retry, but that retry won’t happen for about 25 seconds? Did I get this right? So if I timeout the response after 15 seconds from publishing the webhook, I will miss the two automatic retires. Is this correct? If so, then the issue that Jim posted is very clear.

It’s the opposite. The 3 retries occur over a span of around 20 seconds. So if your device comes online within 20 seconds, then the response should be received. If not, then it will be lost.

Thanks for the clarification.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.