Equivalent of Celery in Node JS

garima picture garima · Feb 12, 2015 · Viewed 22.4k times · Source

Please suggest an equivalent of Celery in Node JS to run asynchronous tasks. I have been able to search for the following:

  1. (Later)
  2. Kue (Kue),
  3. coffee-resque (coffee-resque)
  4. cron (cron)
  5. node-celery(node celery)

I have run both manual and automated threads in background and interact with MongoDB.

node-celery is using redis DB and not Mongo DB. Is there any way I can change that?When I installed node-celery redis was installed as dependency.

I am new to celery, Please guide.Thanks.

Answer

Vanuan picture Vanuan · Oct 12, 2016

Celery is basically a RabbitMQ client. There are producers (tasks), consumers (workers) and AMQP message broker which delivers messages between tasks and workers.

Knowing that will enable you to write your own celery in node.js.

enter image description here

node-celery here is a library that enables your node process to work both as a celery client (Producer/Publisher) and a celery worker (Consumer).

See https://abhishek-tiwari.com/post/amqp-rabbitmq-and-celery-a-visual-guide-for-dummies