Skip to content

Instantly share code, notes, and snippets.

@flopezluis
Created August 4, 2012 08:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save flopezluis/3255861 to your computer and use it in GitHub Desktop.
Save flopezluis/3255861 to your computer and use it in GitHub Desktop.
Bookmark to delete all the queues in a vhost. RabbitMQ
//add this to your bookmarks. The default vhost in RabbitMq is "/",
//so you should have as virtualhost %2F, but due to chrome escape it, i used %252f
//i assume you're in the management site (http://www.rabbitmq.com/management.html)
javascript:
vhost="%252f";
var delete_queues = function(name) {
$.ajax({
url:'api/queues/' +vhost+ '/' + name,
type: 'DELETE',
success:function(data) {
console.log(name + " Delete");
}
});
};
$.ajax({
url: '/api/queues/' + vhost,
success: function(data) {
for (queue in data) {
queue_name = data[queue].name;
delete_queues(queue_name);
}
window.location.reload(); # The plugin reloads every 5 seconds if you enable it
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment