Skip to content

Commit

Permalink
DLX queue should inherit type
Browse files Browse the repository at this point in the history
  • Loading branch information
bckp committed Mar 14, 2024
1 parent 58c82dc commit 77246c8
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/DI/RabbitMQExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -134,12 +134,17 @@ protected function processExtensions(array &$config): void
$queueDlxName = "{$name}.dlx";
$queueDlxArguments = [];

# If we have set queue type, dlx should copy it
if ($config['queues'][$name]['arguments']['x-queue-type'] ?? false) {
$queueDlxArguments['x-queue-type'] = $config['queues'][$name]['arguments']['x-queue-type'];
}

if (!is_bool($data['dlx'])) {
$queueDlxName .= $dlxSuffix;
$queueDlxArguments = [
'x-dead-letter-exchange' => $exchangeOut,
'x-message-ttl' => $data['dlx'] * 1000,
];
] + $queueDlxArguments;

$config['exchanges'][$exchangeOut] = $this->exchangesHelper->processConfiguration([
'connection' => $data['connection'],
Expand Down

0 comments on commit 77246c8

Please sign in to comment.