How to delete a quorum queue without an elected leader or any online replicas #12410
-
Describe the bugHi, A user can get into a situation where a quorum queue's nodes were removed from the cluster, but the queue still exists in RabbitMQ's database. This happens with This leads to multiple issues:
Reproduction steps
After the nodes start up:
Management interface shows no queues. The queue can not be deleted, because all these operations return empty:
The reason for this is because only the
Expected behavior
Additional contextNo response |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 6 replies
-
@luos there have been multiple iterations on I don't think there's much interest in tweaking it further. This is not a normal operational scenario, so a dedicated CLI command is a sufficiently good solution. |
Beta Was this translation helpful? Give feedback.
-
Hi, I agree it's not a scenario which happens very often. I've tried the same reproduction with 4.0.2, it can not delete the queue:
It's because the queue is in
Problem is, not sure that In any case, seems like khepri resolves the issue. |
Beta Was this translation helpful? Give feedback.
-
Do we have any update on this ticket? Are we planning to fix this issue with mnesia database or the only option is to enable Khepri to recreate the queue when node majority count is not matching? Please advise. |
Beta Was this translation helpful? Give feedback.
An improved (more modern, Khepri-compatible) version of this would use
rabbit_db_queue:delete/2
which is the highest level API that will use Khepri or Mnesia, depending on which data store is used in the cluster, and the API cannot be reduced further.It takes a resource name, just like in @luos' example, a
{resource, VHostName, queue, QueueName}
tuple.