Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
titleTo show the rabbitmq users' permissions
$ rabbitmqadmin --user=$RBT_USER --password=$RBT_PASSWD list permissions
+---------+-----------+------+--------+-------+
|  vhost  | configure | read |  user  | write |
+---------+-----------+------+--------+-------+
| /       | .*        | .*   | rabbit | .*    |
| vhMon01 | .*        | .*   | rabbit | .*    |
+---------+-----------+------+--------+-------+

Sending a simple message to an exchange in a vhost

Code Block
titleSending a simple message to an exchange in a vhost
rabbitmqadmin --user=$RBT_USER --password=$RBT_PASSWD --vhost=$VHOST publish routing_key="type1" exchange="ex.topic.01" payload="type1:test message"

Sending a JSON File to an exchange in a vhost

In the example here, the file 'message01.json' contains json. It seems odd but the rabbitmqadmin command doesn't support sending files.


Code Block
titleSending a JSON file as a message to exchange in a vhost
JSON=$(cat message01.json);rabbitmqadmin --user=$RBT_USER --password=$RBT_PASSWD --vhost=$VHOST publish exchange="ex.entry.point" properties='{"content_type":"application/json"}' routing_key="type1" payload="$JSON"