File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change 88use Enqueue \AmqpTools \DelayStrategyAware ;
99use Illuminate \Contracts \Events \Dispatcher ;
1010use Illuminate \Queue \Events \WorkerStopping ;
11+ use Enqueue \AmqpTools \RabbitMqDlxDelayStrategy ;
1112use Enqueue \AmqpTools \RabbitMqDelayPluginDelayStrategy ;
1213use Illuminate \Queue \Connectors \ConnectorInterface ;
1314use VladimirYuldashev \LaravelQueueRabbitMQ \Queue \RabbitMQQueue ;
@@ -61,7 +62,8 @@ public function connect(array $config): Queue
6162 ]);
6263
6364 if ($ factory instanceof DelayStrategyAware) {
64- $ factory ->setDelayStrategy (new RabbitMqDelayPluginDelayStrategy ());
65+ $ delayStrategy = isset ($ config ['options ' ]['queue ' ]['delay_strategy ' ]) ? $ config ['options ' ]['queue ' ]['delay_strategy ' ] : 'RabbitMqDelayPluginDelayStrategy ' ;
66+ $ factory ->setDelayStrategy (new $ delayStrategy ());
6567 }
6668
6769 /** @var AmqpContext $context */
You can’t perform that action at this time.
0 commit comments