Package: rabbitholer
RabbitholerAbstractRabbitholer is a very simple tool for communicating with aRebbiMQserver overAMQPprotocol. It uses thepikalibrary for python and it offers convenient command line interface for sending and receiving messages to and from a RabbitMQ server instance. Rabbitholer is essentially a lightweight AMQP client.I wrote this because I often had to debug RabbitMQ messages while working on different projects. Theweb management pluginfor RabbitMQ can be convenient but it doesn’t really integrate with the other command line utilities I am used to (GNU core utilities). I’ve designed Rabbitholer along the lines of theminimalism ideabecause I wanted it to be as versatile as possible. Easy integration with other utilities is a core design principle here.InstallationUsageA basic run ofrabitholer --helpgives:usage: rabitholer [-h] [--version] [--verbose] Command ...

Interact with RabbitMQ exhanges and queues

optional arguments:
  -h, --help      show this help message and exit
  --version, -v   Print veriosn inormation
  --verbose, -vv  Print a lot of information about the execution.

Commands:
  A list of the avialble commands

  Command
    send          Send a message to an exchange
    read          Send a messages to an exchange read from the standard input.
    pipe          Create a named pipe connected to an exchange
    monitor       Monitor the messges on an exchangeCurrently there are four supported commands: send, read, pipe and monitor. All commands have certain arguments that are common between all of them. Those instruct the application how to connect to the server. They include:ArgumentDescription--server,-sThe IP of the RabbitMQ. Standard port is assumed (5672).--exchange,-eThe name of the exchange to be declared while connecting.--queue,-qThe name of the queue to be bound to the exchange while connecting.--routing,-rThe routing key to be used for outgoing messages.Different arguments may influence different commands. For example, when receiving messages, the routing key does not play a role. The exchange will be declared as non-passive, non-durable and non-auto-delete and of typefanout. This means that the application can connect to an existing exchange. To note is however that if the exchange already exists, it must be of typefanout. The queue will be declared as non-auto-delete. Both the exchange and the queue have default names of “general”. These are the names that will be used unless specified otherwise thought the command line arguments. If not specified, the routing key will be left as an empty string. You can read more about the RabbitMQ exchanges and queueshere (complete reference guide)andhere (quick explantion of the AMQP model).send: Simply sends a message to the specified exchange with the specified routing key.Intended to be used like:rabbitholersend<msg>Multiple messages can be send like:rabbitholersend"<msg1>""<msg2>"...read: Reads the standard output and dumps it on the specified exchange with the specified routing key. Each line is treated as a separate message.The intended use is something like:echo'<msg>'|rabbitholerreadmonitor: Reads messages from a queue and dumps them on the standard output - each message is on separate line.Example use:rabbitholerread|grep"id:"pipe: Creates anamed pipeconnected to a running instance of the application. Any input to the pipe will be send as a message to the server. The intended use is:rabbitholerpipe./rabbitholethen you can do something like:echo'<msg>'>./rabbithole