How do I only process Jobs with a specific name?
See original GitHub issueHi, in Bull you had “Named jobs”, so you could give a job a name (like you can in BullMQ) but the difference is, that in Bull you were able to only process jobs with a specific name, e.g.
const myJob = await transcoderQueue.add('image', { input: 'myimagefile' });
transcoderQueue.process('image', processImage);
Is this possible in BullMQ as well? I looked into the Worker Class and its types, but were not able to find a similar feature, am I overlooking something?
My setup is something like this: Multiple Workers that run on different processes and each Worker being responsible for one “Shard” (they all do the same but on different resources). Now other instances calculate what shard has to get the job, and then add that job with the shard id as name, so only the Worker responsible for that Shard would get the Job. This was possible in Bull, but as it seems isn’t in BullMQ.
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (3 by maintainers)
Top GitHub Comments
@joeyfigaro there is nothing to update really… Names are just convenience sugar, there are no hidden functionality around them. If you have a specific use-case that cannot be addressed today it is better to create a new feature request. I will close this issue now to avoid confusion as if there is something more to do in it.
The second link is for older bull. This has been slightly changed in BullMQ so that it does not create more confusion.