diff --git a/src/Queue/RabbitMQQueue.php b/src/Queue/RabbitMQQueue.php index 04377a0d..2aa264e2 100644 --- a/src/Queue/RabbitMQQueue.php +++ b/src/Queue/RabbitMQQueue.php @@ -597,7 +597,7 @@ public function close(): void /** * Get the Queue arguments. */ - protected function getQueueArguments(string $destination): array + public function getQueueArguments(string $destination, ?string $failedExchange = null): array { $arguments = []; @@ -610,7 +610,7 @@ protected function getQueueArguments(string $destination): array } if ($this->getRabbitMQConfig()->isRerouteFailed()) { - $arguments['x-dead-letter-exchange'] = $this->getFailedExchange(); + $arguments['x-dead-letter-exchange'] = $this->getFailedExchange($failedExchange); $arguments['x-dead-letter-routing-key'] = $this->getFailedRoutingKey($destination); }