Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

One queue with multiple processors and named jobs #1214

Closed
soulchild opened this issue Feb 11, 2019 · 1 comment
Closed

One queue with multiple processors and named jobs #1214

soulchild opened this issue Feb 11, 2019 · 1 comment

Comments

@soulchild
Copy link
Contributor

I'm in the process of migrating from Kue to Bull and ran into the following problem: I have a single queue with multiple named jobs which are to be processed by different processors (running as different processes). Some process functions need to create further jobs which are supposed to be handled by other processors (running in different processes). Unfortunately, this doesn't work, because I'm getting a Missing process handler for job type $jobName error.

I suppose that's why the documentation explicitly states:

Just keep in mind that every queue instance require to provide a processor for every named job or you will get an exception

I don't quite understand why a processor needs to have knowledge about other processor's capabilities to handle certain jobs? And, more importantly, is there a way around this? Would creating dedicated queues for all the jobs a single processor handles solve the problem?

Thanks for any hints!

@soulchild
Copy link
Contributor Author

soulchild commented Feb 11, 2019

Ok, here's what I got wrong: Processor2 was picking up jobs which were meant for Processor1 and of course it complained about being unable to handle these named jobs. ;-) So having a dedicated queue for each processor (processing specific job types only) would indeed solve my problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant