Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delete/recreate queues #171

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

rjgildea
Copy link
Contributor

I'm not sure you can update existing queues, at least not always, e.g. if changing to x-single-active-consumer. So delete the existing queue before recreating it.

Only delete queues that are empty.

I'm not sure you can update existing queues, at least not always,
e.g. if changing to x-single-active-consumer. So delete the
existing queue before recreating it.

Only delete queues that are empty.
Copy link
Contributor

@Anthchirp Anthchirp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this raise some sort of warning/error/indication if there is a configuration mismatch that can't be reconciled because there are messages in a queue?

@rjgildea
Copy link
Contributor Author

Should this raise some sort of warning/error/indication if there is a configuration mismatch that can't be reconciled because there are messages in a queue?

It's not entirely obvious what response the API gives in the event of being unable to delete a queue - I'll investigate what happens...

@rjgildea
Copy link
Contributor Author

It looks like DELETE if-empty is not supported by quorum queues:

$ curl --silent -u admin:password -X DELETE http://rabbitmq.example.com:15672/api/queues/zocalo/processing_recipe?if-empty=true
{"error":"bad_request","reason":"cannot delete queue 'processing_recipe' in vhost 'zocalo'. queue.delete operations with if-empty flag set are not supported by quorum queues"}

And this line should probably be:

self.delete(endpoint, params={"if-unused": if_unused, "if-empty": if_empty})

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants