From 3c303bbb3e64bd7f58831ab39b18fd17f3fecc3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=86=B7=E4=B8=B6=E7=A7=8B=E7=A7=8B=E7=A7=8B=E7=A7=8B?= =?UTF-8?q?=E7=A7=8B?= <> Date: Wed, 28 Feb 2024 23:05:55 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A4=E6=96=AD$queue=E6=98=AF=E5=90=A6?= =?UTF-8?q?=E4=B8=BA=E7=A9=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Process/Consumer.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Process/Consumer.php b/src/Process/Consumer.php index 1406ef3..653d64e 100644 --- a/src/Process/Consumer.php +++ b/src/Process/Consumer.php @@ -1,4 +1,5 @@ connection ?? 'default'; $queue = $consumer->queue; + if (!$queue) { + echo "Consumer {$class} queue not exists\r\n"; + continue; + } $this->_consumers[$queue] = $consumer; $connection = Client::connection($connection_name); $connection->subscribe($queue, [$consumer, 'consume']); @@ -79,6 +84,5 @@ public function onWorkerStart() } } } - } }