robertpkoenig
robertpkoenig4mo ago

queues

Hello! Sorry for the newbie question. Just researching to see if convex does everything I need. Could I please ask: what is the equivalent of queues in Convex? In a traditional application, if I want to ensure something happens, I put the message on a retry queue. If I wanted queue within my application, would I have to use a third party solution like AWS SQS? Read docs and couldn’t find anything on this.
2 Replies
lee
lee4mo ago
If it's a mutation, you can schedule it with ctx.scheduler.runAfter(0, path.to.mutation), since scheduled mutations are guaranteed exactly once execution. if it's an action, you can use the action retrier https://stack.convex.dev/retry-actions which internally queues the action to guarantee at-least-once execution
Automatically Retry Actions
Learn how to automatically retry actions in Convex while also learning a little about scheduling, system tables, and function references.
robertpkoenig
robertpkoenigOP4mo ago
Thank you very much Lee! Very helpful

Did you find this page helpful?