Skip to content

Commit 8a5a1b4

Browse files
author
Mostafa Abdel Baset
committed
resolve new $className issue
1 parent ddb978a commit 8a5a1b4

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/Queue/Connectors/RabbitMQConnector.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,10 @@ public function connect(array $config): Queue
6363

6464
if ($factory instanceof DelayStrategyAware) {
6565
$delayStrategy = isset($config['options']['queue']['delay_strategy']) ? $config['options']['queue']['delay_strategy'] : 'RabbitMqDelayPluginDelayStrategy';
66-
$factory->setDelayStrategy(new $delayStrategy());
66+
if ($delayStrategy == 'RabbitMqDlxDelayStrategy')
67+
$factory->setDelayStrategy(new RabbitMqDlxDelayStrategy());
68+
else
69+
$factory->setDelayStrategy(new RabbitMqDelayPluginDelayStrategy());
6770
}
6871

6972
/** @var AmqpContext $context */

0 commit comments

Comments
 (0)