This is a more advanced implementation of the message queue and is built on top of the ideas on the earlier project "Message-Queue". This project uses BullMQ instead of Bull for queuing purposes. Also, the worker process is sandboxed to show the implementation of sandboxed processesor to reduce the effect of stalling. Furthermore, the use of event listeners on workers has been demonstrated with other new properties. This project can be used as a blueprint for creating similar functionalities on a bigger scale.
Note: If we pass too many jobs to workers repeatedly and their concurrency level is high, then workers keep on accepting jobs without waiting, i.e, taking jobs before completing the jobs they took. This can cause the Node.js event loop to get busy and Node might send a "max listeners exceeded warning". It is therefore required to monitor the job frequency and concurrency of the workers so that the Node.js event loop is not blocked by the workers and the control is released often enough to prevent application crashes and stalling of jobs. You can find more on this in my blog post.