Skip to content

Instantly share code, notes, and snippets.

@mhorbul
Created September 3, 2009 15:39
Show Gist options
  • Save mhorbul/180361 to your computer and use it in GitHub Desktop.
Save mhorbul/180361 to your computer and use it in GitHub Desktop.
bash # erl -sname foo -setcookie `cat /var/run/rabbitmq/.erlang.cookie` -remsh rabbit@<vhostname>
# Once inside the erlang shell, use:
erl> rabbit_amqqueue:stat_all().
# Find the queue name you need. If it's the first one on the list, for example, use this:
erl> {ok, Worker, _, _} = lists:nth(1,rabbit_amqqueue:stat_all()).
erl> {ok, Q} = rabbit_amqqueue:lookup(Worker).
# Purge the particular queue
erl> rabbit_amqqueue:purge(Q).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment