Routed Worker for bullmq
Worker extension for bullmq.
This worker allows you to register processors for specific job names within the queue. The example shows how this package is used.
bullmq is a peer dependency, you'll need to install it yourself.
Install
npm i @art-of-coding/routed-worker bullmq [--save]
Example
// create a new routed worker with the queue name 'Example' // Interface for job data // Add a route, this is the job name (in this case, 'Greeting')worker.on'Greeting', // start the worker (required!)worker.start
License
Copyright 2020 Art of Coding.
This software is licensed under the MIT License.