Description
Symfony version(s) affected
7.2
Description
Symfony Messenger assumes x-expires
(Queue TTL) renews on re-declaration, however it is not supported by Quorum Queues.
symfony/src/Symfony/Component/Messenger/Bridge/Amqp/Transport/Connection.php
Lines 394 to 396 in a58cfb3
x-expires
(Queue TTL) is supported partially by Quorum Queues. The lease is not renewed on queue re-declaration! This means that all delayed messages get dropped after the TTL expires.
How to reproduce
- Setup a RabbitMQ cluster with Default Queue Type (DQT) Quorum Queues
- Use the delayed messages available via Symfony
- Symfony Messenger sets up delayed queues with a
x-expires
argument - After the queue delay is reached, all messages in the queue are dropped
Possible Solution
Our solution is for now to use classic
queues, however we're probably not the only ones running in to this.
'delay' => [
'arguments'=> [
'x-queue-type' => 'classic',
],
],
Additional Context
Mirrored Classic Queues are deprecated and will be removed in RabbitMQ 4.0. We migrated from Mirrored Classic Queues to Quorum Queues because scheduled (delayed) messages should be highly available (HA). We like the HA guarantees of Quorum Queues, but didn't notice that they don't support renewing the lease for Queue TTL.
Related discussion