Skip to content

[Messenger][Amqp] Queue TTL renewal not supported with Quorum Queues, unexpected dropped messages #57867

Open
@adri

Description

@adri

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.

// delete the delay queue 10 seconds after the message expires
// publishing another message redeclares the queue which renews the lease
'x-expires' => $delay + 10000,

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

  1. Setup a RabbitMQ cluster with Default Queue Type (DQT) Quorum Queues
  2. Use the delayed messages available via Symfony
  3. Symfony Messenger sets up delayed queues with a x-expires argument
  4. 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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions