Search code examples
phpparallel-processinglong-running-processes

PHP Monitoring child processes


I'm working on a script that listens to a message queue. The only problem that I have with this is that I can only bind one queue per script. I'm wondering if there is a way to have a parent php script that can ride herd on a few child scripts to each watch a queue, so that I can receive multiple queue messages, as well as monitoring each child to make sure it's still running.

Basically, each child would watch it's queue, and when it gets a message, it would pass it back to the parent process, and then keep watching the queue.

Edit: I am using RabbitMQ as the message queue.


Solution

  • Uhm... Have you already looked at RabbitMQ?

    http://geekexmachina.com/2010/10/parallelizing-php-rabbitmq/