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
Lost listener event? #1270
Comments
Can you provide a complete test that includes those 150 per minute requests? |
And also please explain which part of the code is not working, it is not clear by your example. |
Excuse me, of course, I will send you all the information to solve this problem. I have created a class to work with microservices in node. In the same way, I will leave you a link to the repo in question so that you can clone it. It is written in typescript is the simplest for and with instructions to copy and run. I appreciate your time https://gitlab.com/sarys.inc/bullmq-microservice-base.git Maybe I am overlooking some configuration of the library, in the same way I am still continuing with the debug, I would also love to know what to do in a case like this. Since we are testing to adopt this library |
What I am seeing is that you are creating a new Queue instance via the Api class for every new job added to the queue: https://gitlab.com/sarys.inc/bullmq-microservice-base/-/blob/main/api/src/index.ts#L23 |
I understand, thank you very much for your prompt response. I will try it! |
How would I replace "waitUntilFinished" to wait for the response of the task? is there another way? await job.waitUntilFinished(this.queueEvents); |
Because you normally do not wait for the tasks to complete. The task itself does whatever it needs to do when it completes, for instance, it could create new tasks, etc. If you think about your problem from a different angle, say you cannot wait for the task to complete, how would you design your system to work in that way? |
Good evening, we are testing a couple of microservices in a development environment simulating requests of 100 per minute and we noticed that it is possible that the listener misses the job finished event. Is there any way to solve it?
simulating requests of 150 per minute, it stops responding in the range of 1-50 and since it is inside an await, the thread remains waiting. thus blocking the whole process
Node: 18
bullmq: 1.80.3 and testing lastest version 1.85.3
solution temporal add delay await setTimeout(150); in worker
NOT WORK Freeze task forever :(
await myQueue.add('house', { color: 'white' }, { delay: 5000 });
The text was updated successfully, but these errors were encountered: