How to realize that consumers automatically trigger to read messages by php rabbitmq

1, According to the official rabbitmq documentation, we set up a test to create a queue and send messages to receive messages, but they are all executed in the form of php server.php and php client.php. If deployed to a server, how to implement client.php automatic consumption of messages in this queue always keeps in touch with the server.
some of the information on the Internet is to write a sell script. And the while loop to deal with it. I don"t know what other way to deal with it.

Php
Mar.07,2021

regular execution of php client.php



:basicConsume;basicGet<br>:

$queue->consume($callback);    // callbackwhile(true)

pull:

for(...) {
    $queue->get();    
}
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b2c368-40b3a.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b2c368-40b3a.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?