-
Hello, When I shutdown RR with SIGINT/SIGTERM , the pipeline closes and RR tries to close workers. My test PHP worker just simulates 20s sleep as long running task and then tries to ack() the message. Unfortunately the amqp plugin is already closed and the Message can't be acked.
The
When I set How am I able to gracefully shutdown RR with long running parallel tasks from amqp - with ability of PHP worker to ack() last message and receive message to shutdown ? (+ in case the num_pollers > workers, it receives further few waiting messages before shutdown message). Thank you for interesting project. I'm former PHPdev, but tried to inspect Go src in VS code with amqp+jobs plugins and RR sdk, built and tried to debug shutdown procedure. Regards, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Hey and welcome to RR @dr-diesel 👋
You also correctly found the problem with the graceful shutdown. RR doesn't know about JOBS which correctly are in the workers. And the case is, that while it in the worker, you may stop the pipeline. Due to the plugin architecture of RR, the JOBS plugin doesn't know about the drivers (aka amqp, kafka, etc). It only knows, that it should call some method to acknowledge this JOB. But the pipeline, as you know, was already stopped. Thus you see this error. Nothing bad is going to happen with the message (lost, for example), only an error message from RR to point your attention. EDIT: Here you may locate a corresponding issue: #1382 |
Beta Was this translation helpful? Give feedback.
Yes, because while consuming the items from the priority queue, goroutine will wait for the response from the PHP worker.
I didn't say about RPC. But this doesn't matter actually, since the mechanism is the same.
That's actually doesn't matter from the broker POV, since the message would be simply re-delivered.
Actually can, during the grace timeout period, but this is not implemented.