Answer the question
In order to leave comments, you need to log in
Is there a worker management solution for RabbitMQ?
Hello, for one PHP project, it was necessary to organize the work of components through a message server. The choice fell on RabbitMQ, and the question immediately arose, is there any ready-made solution for managing workers? Ideally, in order to be able to set the number of workers, the manager program would create them, monitor them, "hanging" - kill them and start them again. Googling and searching on habr, unfortunately, did not bring results. Thanks in advance.
Answer the question
In order to leave comments, you need to log in
To manage workers (number, restart in case of a crash, etc.), supervisord
is best .
To set the number of workers, there is the numprocs=N parameter, where N is the number of worker processes.
Supervisord also has a web interface for process management.
Good article on habré.
https://github.com/videlalvaro/php-amqplib to work with the queue
to be sure that the queue consumers are always running and restart them if they fail, it's easier to implement a simple CLI script and add it to the supervisor.
I use RabbitMQBundle (for Symfony) on projects. Even if you do not use it, see how it is implemented there.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question