Because concurrency in PHP is a complicated topic, php-amqplib authors decided to make it single threaded,
which means at certain points you have to tell the library to loop and wait for a response method to arrive
from RabbitMQ. I assume this involves deliveries, which are server pushed.
See
https://github.com/php-amqplib/php-amqplib/blob/master/PhpAmqpLib/Channel/AbstractChannel.php#L306.
In many clients you register a consumer and I/O is handled in separate threads (or similar) and thus you don't need
to tell the library to wait.
Loops in long running consumer apps/scripts are often placed at the end to avoid natural program termination.
> --
> You received this message because you are subscribed to the Google Groups "rabbitmq-users"
> group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
rabbitmq-user...@googlegroups.com.
> To post to this group, send an email to
rabbitm...@googlegroups.com.
> For more options, visit
https://groups.google.com/d/optout.
>
--
MK
Staff Software Engineer, Pivotal/RabbitMQ