Best practices for tracking duplicate webhooks
See original GitHub issueI was wondering if there’s an accepted way to handle duplicate hooks, currently I’m hashing the response data & storing that in Redis & checking against it to see if I’ve already handled a hook.
I’m just confused as there seems to be no identifier to say “these hooks were meant to do this action on this object” that we can use to check for duplicates, since each webhook/attempt has a unique identifier.
e.g. a video.asset.errored
has happened twice in the same day on the same object - so they’re not duplicate hooks, but have duplicate data. Maybe I’m missing something here - thanks in advance for any pointers.
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Best practices for using webhooks | Stripe Documentation
We advise you to guard against duplicated event receipts by making your event processing idempotent. One way of doing this is logging the...
Read more >Webhook best practices - Shopify.dev
Respond quickly · Track failures · Recover webhooks · Avoid debounces · Ignore duplicates · Manage delays · Implement reconciliation jobs · Use...
Read more >Best Practices for Managing Webhook Data Streams - SparkPost
In order to avoid duplicate data getting into your reporting database, use the the unique event_id to dedup data before adding into your...
Read more >Shopify Webhooks Best Practices Revised and Extended
With this identifier, you can track webhooks that have already been processed and skip them to avoid duplicating their impact on your ...
Read more >How to handle duplicate events in your code (or, why ...
At least once delivery #. Postmark makes a best effort for “at least once delivery” of webhooks. This is in contrast to “exactly...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi @cwqt I agree it’s an important issue. We just try to keep the issues in this repo specific to the node SDK.
I double checked this functionality, duplicates and re-attempts will have the same top level
id
(which is a unique identifier for the event). Thanks for the docs feedback, we can definitely make that more clear, thank you!Appreciate the write-up, but I think this is an important issue that shouldn’t be sidelined into support channels, especially when money is on the line depending on if a hook is accidentally re-handled.
Right okay, that’s just not made clear in the documentation, it’s really ambiguous that & not clear that duplicate webhooks (not a re-attempt) will have the same Id, even now you say they should, not they will …