[Messenger][AMQP] Set the delayed queue as lazy #35619
It's typically the case of delay queue
WARNING: This is a BC Break.
An exception similar to the following will happen if the delayed queue
I don't know how to fix that:
Note: It's possible to change the type at runtime
> Since RabbitMQ 3.6.0, the broker has the concept of Lazy Queues - queues that move their contents to disk as early as practically possible, and only load them in RAM when requested by consumers, therefore the lazy denomination. > > One of the main goals of lazy queues is to be able to support very long queues (many millions of messages). Queues can become very long for various reasons: > > * consumers are offline / have crashed / are down for maintenance > * there is a sudden message ingress spike, producers are outpacing consumers > * consumers are slower than normal > > By default, queues keep an in-memory cache of messages that is filled up as messages are published into RabbitMQ. The idea of this cache is to be able to deliver messages to consumers as fast as possible. Note that persistent messages can be written to disk as they enter the broker and kept in RAM at the same time. From: https://www.rabbitmq.com/lazy-queues.html It's typically the case of lazy queue
Tobion left a comment •
The PRECONDITION_FAILED error can be solved by either changing the naming structure of delay queues or with a feature flag. Also there is a possiblity to ask rabbitmq if the queue with the arguments already exists which you could use to skip the failing declaration.