im running an ec2 instance, with ubuntu 12.04.
i am using aws infastructure, and right now im trying to implement a consumer worker which will consume an sqs queue (queue of msgs, not very important).
to do that i created a php file, which "harvest" the queue for 30 seconds. on top i have a crontab running this page every 30 seconds.
what is a more elegant/proper solution? how do i make a background php proccess, and how i do check if its alive, and kill it restart it, if needed?
- just a clarification - i am asking about the process which consumes the queue, regardless of which/what mechanizem is selected (sqs, rabbitMQ)
thanks for your help