Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the equivalent of Laravel queue jobs in Express?

Laravel offers a feature called Queues where you delegate long running task to a background worker using a service (beanstalkd, Amazon SQS, Rabbit MQ). A quick example would be sending an email through that queued job, instead of from the controller. Said queued job is able to identify whether the task was completed, or, if it failed, retry a certain amount of times.

What's the Express (NodeJS) equivalent of this feature (if it even exists)? I tried researching the topic by directly looking for resources on the service (like RabbitMQ) and I only found tutorial like this one, but just by reading it looks like they're implementing the thing from the ground.

Maybe my expectations are what's wrong in here, but isn't there an equivalent of just writing the business logic code for the queued job and dispatching it?

like image 268
Christopher Francisco Avatar asked Oct 17 '22 09:10

Christopher Francisco


1 Answers

In our case, when we need to implement background jobs to send email with attachments to bulk users using node and express we came across powerful npm module Kue, which provides all features which RabbitMQ provides in php

Official Documentation

Hope it helps!

like image 117
Mahesh Singh Chouhan Avatar answered Oct 19 '22 23:10

Mahesh Singh Chouhan