I use rabbitMQ exactly like manual shows (manual).
while(count($this->channel->callbacks)) {
$this->channel->wait();
}
But when I want to terminate my worker I press Ctrl + c in console, the worker gets the SIGINT signal. The problem is that if there are no messages in a queue, the $channel->wait() method never comes to next iteration, thus it can't be terminated unless I kill it with kill -9. So how can I terminate this endless loop with SIGINT?