Skip to content

Commit

Permalink
Update RabbitMQExtension.php
Browse files Browse the repository at this point in the history
  • Loading branch information
bckp committed Nov 23, 2023
1 parent b96df0b commit 990829b
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/DI/RabbitMQExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -131,18 +131,18 @@ protected function processExtensions(array &$config): void
'connection' => $data['connection'],
'type' => ExchangesHelper::ExchangeTypes[3],
'queueBindings' => [
[
'queue' => $name,
$name => [
'routingKey' => [],
],
],
]);

# DLX Exchange: will pass msg to dlx queue
$exchangeDataBag = $this->exchangesHelper->processConfiguration([
$exchangeDataBag = [
'connection' => $data['connection'],
'type' => ExchangesHelper::ExchangeTypes[2], // headers
'queueBinding' => []
]);
'queueBindings' => []
];

# Expand dlx into new queues and exchange for them
foreach ($data['dlx'] as $pos => $seconds) {
Expand All @@ -167,7 +167,7 @@ protected function processExtensions(array &$config): void
];
}

$config[$exchangeDlx] = $exchangeDataBag;
$config['exchanges'][$exchangeDlx] = $this->exchangesHelper->processConfiguration($exchangeDataBag);
unset($config['queues'][$name]['dlx']);
}
}
Expand Down

0 comments on commit 990829b

Please sign in to comment.