Queues: push delivery to an HTTP endpoint, signed per Standard Webhooks, with retries and a dead-letter queue #54447
Unanswered
martijn00
asked this question in
Feature Requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Supabase Queues are pull only. A consumer calls
pgmq.read(orpgmq_public.readthrough the Data API), processes the message and deletes it. The documented way to run a server-side consumer is an Edge Function that a Supabase Cron job invokes every N seconds ("Consume queue messages"), and the automatic embeddings guide builds the same loop out of pg_cron,pgmq.readandnet.http_post.Each project that wants "call my endpoint when a message arrives" rebuilds the same parts:
net._http_responseon a later run because pg_net is asynchronous;read_ctis there, but nothing acts on it);Ask
A push subscription per queue, managed like a Database Webhook:
webhook-id= msg_id,webhook-timestamp,webhook-signature), the scheme Platform Webhooks already use, so the receiver can verify it with an existing library.max_attempts.Our case
We maintain an open-source library that ships this dispatcher as SQL: a pg_cron job that claims deliveries and posts them through pg_net with an HMAC header (
dispatch_workflow_deliveries). It works, but by default it runs every second whether or not anything is queued, and the retry, lease and dead-letter logic is exactly what a built-in push consumer would own.All reactions