"Dead-letter for deleted queues" - Message evacuation on queue deletion for anonymous/ephemeral queues (publish to designated exchange/routing key) #14666
-
ContextAnonymous (server‑named) queues bound under By design, these ephemeral queues lack resilience settings, and the deletion path of a queue (consumer ends, connection drops, explicit delete, or Is your feature request related to a problem? Please describe.Currently, when a queue is deleted—especially anonymous/ephemeral queues—there is no native mechanism to evacuate unconsumed messages to a safe destination. This causes message loss and reduces reliability for temporary flows that, due to business requirements, must not discard their residual messages. Describe the solution you'd likeIntroduce a native on‑delete evacuation mechanism: when a queue is deleted, any remaining messages are re‑published to a specified exchange with a specified routing key. Suggested Queue Arguments
Expected Behavior
Technical Considerations
ImpactThis feature reduces message loss in ephemeral flows, improves operational reliability, and avoids fragile consumer‑side workarounds—while preserving the simplicity and benefits of anonymous queues when desired. Describe alternatives you've consideredUse same dead-letter configuration and mechanism to add the behavior of move messages when queue is deleted, if dead-letter configuration is present. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
@luizcarlosfaria transient queues by definition do not guarantee anything in terms of data safety. Users of consistent hashing exchanges with N transient queues for workload distribution these days can use a stream or a partitioned stream (which are durable, replicated, efficient and allow for parallel consumption from followers) instead of asking our tiny team to invest a lot of time into introducing "data safety features" for transient queues. |
Beta Was this translation helpful? Give feedback.
-
@luizcarlosfaria @LeonardoDaLuz @ruifgdias @reinaldocoelho @emensonlima01 @r-leafar @ruifgdias also worth mentioning: our team really does not appreciate upvoting fests. You are not on Reddit. Upvoting fests are very obvious to any long time maintainer, and make it extra clear that your team is the only one affected, which does not make your case any stronger. At the very least don't all upvote on the same day. |
Beta Was this translation helpful? Give feedback.
-
This has been discussed to death before, on the mailing list and elsewhere. The reason why RabbitMQ does not dead letter messages in a deleted queue is the following: there can be tens of millions of messages in a deleted queues, and re-publishing them can take a lot of time and resources, confuse the user, cause channel operation ( None of those things are very helpful when a user tries to delete a queue, possibly a queue that has accidentally accumulated a backlog. In fact, nearly all users want the exact opposite of those things when they delete a queue with a massive backlog. RabbitMQ is long done with the "One True Queue Type™ with a bajillion features based on settings" approach. That's why we have queue types, and soon enough will likely have queue sub-types. We are long done with flags that require so many internal changes that you might as well develop a new queue type. Speaking of which, queue types these days can be implemented by plugins, so you are welcome to develop one and open source it (or not) without convincing our team or waiting for us to get to this highly controversial idea.
Quorum queues do have DLX safety features that no other queue types support. Quorum queues are not also not mean to be semantically transient, cannot be non-durable, ignore the transient property on the messages routed to them, and so on. So yeah, that's a lot of text but not a lot of considerations for what all other RabbitMQ users need. Sorry. |
Beta Was this translation helpful? Give feedback.
This has been discussed to death before, on the mailing list and elsewhere. The reason why RabbitMQ does not dead letter messages in a deleted queue is the following: there can be tens of millions of messages in a deleted queues, and re-publishing them can take a lot of time and resources, confuse the user, cause channel operation (
queue.delete
) timeouts and force applications to retry deletes.None of those things are very helpful when a user tries to delete a queue, possibly a queue that has accidentally accumulated a …