到此为止,我们看到了 topic 的组播,异步特性
命令汇总
rpm -ivh rabbitmq-server-3.6.1-1.noarch.rpm
wget https://packages.erlang-solutions.com/erlang/esl-erlang/FLAVOUR_1_general/esl-erlang_18.3-1~centos~6_amd64.rpm
rpm -ivh esl-erlang_18.3-1~centos~6_amd64.rpm
rpm -e erlang-erts-R14B-04.3.el6.x86_64
wget http://packages.erlang-solutions.com/erlang-solutions-1.0-1.noarch.rpm
rpm -ivh erlang-solutions-1.0-1.noarch.rpm
cat /etc/yum.repos.d/erlang_solutions.repo
yum update erlang.x86_64
wget http://www.rabbitmq.com/releases/rabbitmq-server/v3.6.1/rabbitmq-server-3.6.1-1.noarch.rpm
rpm -ivh rabbitmq-server-3.6.1-1.noarch.rpm
/etc/init.d/rabbitmq-server start
netstat -an | grep -E "(4369|25672|5672|5671|15672|61613|61614|1883|8883)"
rabbitmq-plugins list
netstat -ant | grep 15672
rabbitmq-plugins enable rabbitmq_management
wget http://localhost:15672/cli/rabbitmqadmin
file rabbitmqadmin
chmod x rabbitmqadmin
rabbitmqadmin --help
rabbitmqadmin help subcommands
rabbitmqadmin help config
rabbitmqadmin list users
rabbitmqadmin list users name
rabbitmqadmin list users tags
rabbitmqadmin list vhosts
rabbitmqadmin list connections
rabbitmqadmin list exchanges
rabbitmqadmin list bindings
rabbitmqadmin list permissions
rabbitmqadmin list permissions read
rabbitmqadmin list channels
rabbitmqadmin list parameters
rabbitmqadmin list consumers
rabbitmqadmin list queues
rabbitmqadmin list policies
rabbitmqadmin list nodes
rabbitmqadmin show overview
rabbitmqadmin delete queue name=hello
rabbitmqadmin delete user name=test
rabbitmqadmin delete exchange name=test
rabbitmqadmin delete binding source='kk' destination_type=queue destination=test properties_key=test
rabbitmqadmin list bindings source destination_type destination properties_key
rabbitmqadmin purge queue name=test
rabbitmqadmin -f raw_json list users
rabbitmqadmin -f long list users
rabbitmqadmin -f pretty_json list users
rabbitmqadmin -f kvp list users
rabbitmqadmin -f tsv list users
rabbitmqadmin -f table list users
rabbitmqadmin -f bash list users
rabbitmqadmin declare queue name=test durable=true
rabbitmqadmin publish routing_key=test payload="just for test"
rabbitmqadmin get queue=test requeue=true
rabbitmqadmin get queue=test requeue=false
rabbitmqadmin declare exchange name=my.fanout type=fanout
rabbitmqadmin declare exchange name=my.direct type=direct
rabbitmqadmin declare exchange name=my.topic type=topic
rabbitmqadmin publish routing_key=test exchange=my.fanout payload="just for test"
rabbitmqadmin publish routing_key=test payload="just for test2"
rabbitmqadmin declare binding source=my.fanout destination=test routing_key=first
rabbitmqadmin publish routing_key=first exchange=my.fanout payload="just for test1"
rabbitmqadmin publish routing_key=first payload="just for test2"
rabbitmqadmin declare queue name=test.fanout durable=true
rabbitmqadmin declare binding source=my.fanout destination=test.fanout routing_key=second
rabbitmqadmin publish routing_key=second exchange=my.fanout payload="just for test3"
rabbitmqadmin get queue=test.fanout requeue=true
rabbitmqadmin purge queue name=test
rabbitmqadmin purge queue name=test.fanout
rabbitmqadmin publish routing_key=first exchange=my.fanout payload="just for test4"
rabbitmqadmin get queue=test requeue=true
rabbitmqadmin get queue=test.fanout requeue=true
rabbitmqadmin publish exchange=my.fanout payload="just for test5"
rabbitmqadmin declare queue name=test.direct durable=true
rabbitmqadmin declare binding source=my.direct destination=test routing_key=third
rabbitmqadmin declare binding source=my.direct destination=test.direct routing_key=fourth
rabbitmqadmin publish routing_key=third exchange=my.direct payload="just for test6"
rabbitmqadmin publish routing_key=fourth exchange=my.direct payload="just for test7"
rabbitmqadmin get queue=test.direct requeue=true
rabbitmqadmin purge queue name=test
rabbitmqadmin purge queue name=test.direct
rabbitmqadmin declare queue name=test.topic durable=true
rabbitmqadmin declare binding source=my.topic destination=test routing_key=*.hard.*
rabbitmqadmin declare binding source=my.topic destination=test.topic routing_key=cheap.#
rabbitmqadmin declare binding source=my.topic destination=test.direct routing_key=*.*.food
rabbitmqadmin declare binding source=my.topic destination=test.fanout routing_key=*.*.food
rabbitmqadmin declare binding source=my.topic destination=test.fanout routing_key=xtest
rabbitmqadmin publish routing_key=a.hard.b exchange=my.topic payload="just for test8"
rabbitmqadmin publish routing_key=a.hard.food exchange=my.topic payload="just for test9"
rabbitmqadmin publish routing_key=cheap.soft.food exchange=my.topic payload="just for test10"
rabbitmqadmin publish routing_key=cheap.hard.drink exchange=my.topic payload="just for test11"
rabbitmqadmin publish routing_key=xtest exchange=my.topic payload="just for test12"
rabbitmqadmin publish routing_key=cheap.hard.food exchange=my.topic payload="just for test13"
原文地址