Skip to content

EspoCRM – Open Source CRM Application

RabbitMq nack not multiple

Yurii394e4d8209ca
diff --git a/application/Espo/Core/Job/Processing/RabbitMq/Consumer.php b/application/Espo/Core/Job/Processing/RabbitMq/Consumer.php
index ab047f5335..79575564d6 100644
--- a/application/Espo/Core/Job/Processing/RabbitMq/Consumer.php
+++ b/application/Espo/Core/Job/Processing/RabbitMq/Consumer.php
@@ -159,11 +159,6 @@ class Consumer implements ConsumerInterface
return $id;
}
- private function nack(AMQPMessage $message): void
- {
- $message->nack(false, true);
- }
-
private function setupConsume(AMQPChannel $channel, string $queue): void
{
$channel->basic_consume(
@@ -174,7 +169,7 @@ class Consumer implements ConsumerInterface
} catch (Throwable $e) {
$this->log->error("Worker: Could not get job ID.", ['exception' => $e]);
- $this->nack($message);
+ $message->nack();
return;
}
@@ -189,7 +184,7 @@ class Consumer implements ConsumerInterface
'id' => $id,
]);
- $this->nack($message);
+ $message->nack();
return;
}