Repository navigation
v0.2.0
Second experiment: what queue:work and rabbitmq:consume do when RabbitMQ stops answering but TCP stays up. The broker is frozen with docker compose pause for 100 s while idle workers with a 15 s heartbeat wait for jobs.
queue:workwaits inbasic_getuntil the broker is back:channel_rpc_timeoutdefaults to 0, and a wait without a timeout never gets to php-amqplib's heartbeat checks.--timeoutand--max-timedon't cover this wait either.- With heartbeats and a 10 s
channel_rpc_timeout,queue:workstops after 42 s withLostConnectionand exit code 0. The same timeout without heartbeats only reports an error every 14 s. rabbitmq:consumedoesn't notice: its non-blocking poll counts the client's own heartbeats as activity (vyuldashev/laravel-queue-rabbitmq#673). With--max-timeit stops consuming but can't close the channel until the broker is back; withchannel_rpc_timeoutit exits with code 1.
Other changes:
- The lab uses the package's default connection path.
LAB_HEARTBEAT,LAB_IO_TIMEOUTandLAB_RPC_TIMEOUTset the connection options of a process. bin/lab artisanhandles an exception from a command likephp artisanin an application: it reports and prints it and exits with code 1.- The results of experiment 1 are the same.
Checked in CI with PHP 8.3–8.5, Laravel 13.37, php-amqplib 3.7.5 and RabbitMQ 3.13.3. Until vyuldashev/laravel-queue-rabbitmq#680 is released, the package is installed from its branch.