Skip to content

Commit

Permalink
🚀feat(consumer) add exception handling for AMQPTimeoutException (#6391)
Browse files Browse the repository at this point in the history
  • Loading branch information
BinaryAlan authored Dec 15, 2023
1 parent de0a823 commit dae5588
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Consumer.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit dae5588

Please sign in to comment.