What are the consequences of doing this:
public function execute(AMQPMessage $message)
{
while (true) {
// Do some heavy work here (Example: retrieve the last 50 items from the database and update their states, etc)
sleep(2); // Sleep for 2 seconds
}
return true; // Acknowledge (Never executed)
}
- One unacknowledged message (Bad)
- Max execution time of PHP script (But, it works perfectly and is never ending even though phpinfo shows 60 seconds)
- Any more issues
Thanks