Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Oneliner for deleting all RabbitMQ connections.
# Probably only works for ZSH. Expects jq ( and node ( to be installed
# Replace <user>, <password>, and <host> to suit your needs.
URL="https://<user>:<password>@<host>"; for name in "${(@f)$(http $URL/api/connections | jq '.[]|.name')}"; do encoded=`node -e "console.log(encodeURIComponent($name))"`; http DELETE $URL/api/connections/$encoded; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.