Supabase Queue Trigger
AI-generatedOverview
This node is a trigger that polls a Supabase pgmq queue for new messages using the READ operation. It is useful for workflows that need to react to messages arriving in a specific queue in Supabase, such as processing tasks, notifications, or data updates. The node fetches messages from the queue at configured intervals and outputs them for further processing in the workflow.
Use Case Examples
- A workflow that triggers whenever a new message is added to a 'task-queue' in Supabase, processing each task automatically.
- A notification system that listens to a 'notifications' queue and sends alerts based on incoming messages.
Properties
| Name | Meaning |
|---|---|
| Poll Times | Times at which polling should occur, with options for frequency such as every minute, hour, day, week, month, custom cron expressions, or every X minutes/hours. |
| Queue Name | Name of the pgmq queue to monitor. |
| Messages Per Poll | Number of messages to fetch from the queue per poll. |
| Visibility Timeout (Seconds) | Time in seconds that a message will be invisible to other consumers after being read. |
| Additional Options | Additional settings such as whether to create the queue if it does not exist. |
Output
JSON
id- Unique identifier of the message.enqueued_at- Timestamp when the message was enqueued.vt- Visibility timeout value for the message.read_ct- Count of how many times the message has been read.message- The actual message content from the queue.queue_name- Name of the queue from which the message was read.operation- The operation performed, which is 'read'.raw- The raw message object as received from Supabase.
Dependencies
- Supabase pgmq extension installed in the database
- Supabase service role key with appropriate permissions
Troubleshooting
- Authentication errors (401 or 403) indicate invalid or insufficient Supabase credentials; verify the service role key and permissions.
- A 404 error means the specified queue does not exist or the pgmq functions are not available; ensure the queue is created and the pgmq extension is installed.
- Errors mentioning missing functions indicate the pgmq extension or helper functions are not installed properly; verify the installation in the Supabase database.
Links
- Supabase pgmq Documentation - Official documentation for the pgmq extension used for queue management in Supabase.