[rabbitmq-discuss] Command Line Deletion of Queues?

Tony Garnock-Jones tonyg at lshift.net
Fri Aug 21 09:05:08 BST 2009


Rich Kim wrote:
> Is there any command line method to explicitly delete a durable queue?

One of the things I've wanted to do for a while is to use something like
the rabbitmq-c library, in conjunction with the spec XML/JSON
definitions, to build a tool for interactive or shell-scripting use that
automatically exposes the whole protocol. It's just always been eclipsed
by more important tasks :-)

I'm imagining either something like

  amqptool -U guest guest -V / -H localhost -P 5672 \
           --queue.delete -queue "myqueue" \
           --queue.declare -queue "myqueue -autodelete false \
           --basic.publish -exchange "" -routingkey "myqueue" \
              -.contenttype "text/plain" \
              "Hello, world!\n"

or

  amqptool -U guest guest -V / -H localhost -P 5672 << END
  QUEUE.DELETE AMQP/0-8
  Queue: myqueue

  QUEUE.DECLARE AMQP/0-8
  Queue: myqueue
  Autodelete: false

  BASIC.PUBLISH AMQP/0-8
  Exchange:
  Routingkey: myqueue
  .Contenttype: text/plain
  Content-length: 14

  Hello, world!
  END

Hmm. Actually the latter really reminds me of STOMP, without the silly
NUL business, and with AMQP-style commands instead of STOMP commands. If
it were done as a network protocol, then *netcat* would be a sufficient
client! Hmm!

Regards,
  Tony





More information about the rabbitmq-discuss mailing list