I have a PHP script that waits for AMQP messages. When a message comes in it is processed and after processing is done it will wait for the next message.
The problem is of course that this is blocking. If e.g. an incoming message needs me to contact an external REST API, the processing could take several seconds to complete and all that time it won't be able to process other messages.
I can start my script several times, e.g. 8 times. This way I have 8 "consumers" and this seems to work very well. However, the problem now is, how do I manage these 8 different processes?
I basically looking for some utility that allows me to specify that I want to start a particular script 8 times and then to be able monitors these processes for up time etc. Is there such utility?