diff --git a/src/Consumer.php b/src/Consumer.php index efc984c..ed2d9ab 100644 --- a/src/Consumer.php +++ b/src/Consumer.php @@ -80,9 +80,13 @@ public function execute(AMQPMessage $message): int return $this->doExecute( $this->queueService->getToProcess($data['id']) ); - } catch (UnexpectedValueException | AttemptsReachedException $exception) { + } catch (UnexpectedValueException $exception) { $this->logger->alert($exception->getMessage(), $this->getMessageLogParams($message)); + return self::MSG_REJECT; + } catch (AttemptsReachedException $exception) { + $this->logger->notice($exception->getMessage(), $this->getMessageLogParams($message)); + return self::MSG_REJECT; } }