My FeedDiscussionsHashnode Enterprise
New
Sign in
Log inSign up
Learn more about Hashnode Headless CMSHashnode Headless CMS
Collaborate seamlessly with Hashnode Headless CMS for Enterprise.
Upgrade ✨Learn more
Rodrigo Mansueli

24 likes

·

1.0K reads

3 comments

Chris Webb
Chris Webb
Aug 8, 2024

Is there a concern with using pg_http with triggers because it is synchronous whereas pg_net is asynchronous?

1
·
·1 reply
Rodrigo Mansueli
Rodrigo Mansueli
Author
·Aug 8, 2024

Yes, this concern is valid, and it comes down to whether the webhook is essential to your logic.

This is a better solution if you need to ensure a response from the hook. If you are fine with failures on the webhook, then you can use the default hooks with async behavior is superior.

A third option is to have a queue with retries using async logic. You can use supa_queue for that:

github.com/mansueli/supa_queue

1
·