From dae558843dbb1b12b5f7e7a9e01af063de4be3ae Mon Sep 17 00:00:00 2001 From: Binary Alan <76660421@qq.com> Date: Fri, 15 Dec 2023 17:45:03 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=80feat(consumer)=20add=20exception=20?= =?UTF-8?q?handling=20for=20AMQPTimeoutException=20(#6391)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Consumer.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Consumer.php b/src/Consumer.php index 69e039a..c48413d 100644 --- a/src/Consumer.php +++ b/src/Consumer.php @@ -84,7 +84,7 @@ function (AMQPMessage $message) use ($consumerMessage, $concurrent) { if ($maxConsumption > 0 && ++$currentConsumption >= $maxConsumption) { break; } - } catch (AMQPTimeoutException $exception) { + } catch (AMQPTimeoutException) { $this->eventDispatcher?->dispatch(new WaitTimeout($consumerMessage)); } catch (Throwable $exception) { $this->logger->error((string) $exception); @@ -192,7 +192,7 @@ protected function getCallback(ConsumerMessageInterface $consumerMessage, AMQPMe return; } if ($result === Result::NACK) { - $this->logger->debug($deliveryTag . ' uacked.'); + $this->logger->debug($deliveryTag . ' nacked.'); $channel->basic_nack($deliveryTag, false, $consumerMessage->isRequeue()); return; }