T
tRPC

❓-help

BullMQ + TRPC

Tturbina5/25/2023
Curious how to configure BullMQ with TRPC correctly. Currently I have the queue, queueevents, and the worker inside a router. Though it works, I have a feeling its not the right approach?
DDani;5/26/2023
I don't think you should have those in a router. BullMQ should be defined outside of tRPC, then you'll be able to queue new jobs from your tRPC routers
Tturbina5/26/2023
Ya, I actually moved BullMQ into its own node sever. Rather not have long-lasting processes like this in a NextJS app
DDani;5/26/2023
Fair enough, i mean you can have it in the same node process using a custom nextjs server, you just can’t go serverless if you do that

Looking for more? Join the community!