Docs

Queues

Durable message queues: send work, read it with a visibility timeout, archive or delete it, dead-letter what keeps failing, and let a function consume it.

Updated Oct 26, 2026

A queue keeps messages until something processes them. Producers send JSON messages (optionally delayed); consumers read them, which hides each message for a visibility timeout, and archive or delete it when the work is done. If a consumer crashes, the message simply becomes visible again. With max reads, a message that keeps failing moves to a dead-letter queue. The API mirrors Supabase Queues (pgmq): send, send_batch, read, pop, archive, delete, set_vt, purge, metrics.

sendreadarchive / deletenot done in timeread too oftenProducerAPI, SDK,function, app (ifallowed)Queuewaiting messagesConsumerread → hidden forvt secondsArchived / deleteddoneDead-letter queueafter max reads

#Create a queue and send messages

sov queues create emails-dead
sov queues create emails --vt 60 --max-reads 5 --dlq emails-dead
sov queues send emails '{"to": "ada@example.com", "template": "welcome"}'
sov queues send emails '{"to": "bob@example.com"}' --delay 300
sov queues metrics emails

#Let a function consume a queue

Bind a deployed function and Sovaria hands it batches of messages through the background job queue. A run that returns acknowledges its batch (archives it, or deletes it with ack: "delete"); a run that throws hands the messages back with a short backoff, and max_reads sends a message that keeps failing to the dead-letter queue. Process each message idempotently by msg_id.

sov queues update emails --consumer send-email --batch 10 --concurrency 2

#Who can use a queue

  • The project team, with the queues.read permission (list, metrics, look at messages) or queues.write (create, send, read, archive, delete, purge — reading hides messages, so it is a write).
  • Service keys and your functions (their own keys).
  • App users and the anon key: send only, and only to a queue whose owner turned on app send (app_send: true). Use it when the app enqueues work for the backend; nobody can read a queue from the app.
  • Queues belong to the environment they were made in; every change is audited.

#Plans

FreeProUltraTeamEnterprise
Queues per project (queues.max_queues)3251002501,000
Messages sent per month (queues.messages_month)100,000 (then stops)2,000,00010,000,00050,000,000200,000,000
Largest message (queues.max_message_bytes)16 KB256 KB256 KB1 MB1 MB
Stored per project (queues.storage_bytes)50 MB2 GB10 GB50 GB200 GB
Archived / dead messages kept (queues.retention_days)1 day7 days14 days30 days30 days

Paid plans bill messages beyond the allowance at $0.40 per million. Consumer runs count as function invocations. Large payloads: store them in a document or a file and send the id. See Plan limits.

#Compared with Supabase Queues

SovariaSupabase Queues (pgmq)
send / read / pop / archive / delete / set_vt / purge / metricsYesYes
Dead-letter queue after N readsBuilt inDo it yourself
A function consumes the queueBuilt in (batches, concurrency, backoff)Write a cron + Edge Function poller
DelayPer sendPer send
Client-side sendsOpt-in per queue, send onlyThrough RLS on the queue tables
ConsoleMetrics, browse waiting / archived / dead, send, settingsBrowse and send

#Coming from Firebase or Supabase?

PlatformWhat this is called there
FirebaseCloud Tasks
SupabaseSupabase Queues (pgmq)
SovariaQueues

Moving an existing app? Migrate from Supabase or Firebase imports users (with their passwords), data, files and rules.