rabbitmq 的基本命令

访问量: 203

1. 启动,停止: sudo /etc/init.d/rabbitmq-server start

或者: service rabbitmq 

2. 查看其中的queue names: 

$ rabbitmqadmin list queues    ( 该命令也可以这样写:   sudo rabbitmqctl list_queues  )
+---------------------------+----------+
|           name            | messages |
+---------------------------+----------+
| aa.matching           | 0        |
| aa.notification.email | 0        |
| aa.order.processor    | 0        |
| aa.orderbook.slave    | 0        |
| aa.trade.new          | 0        |
+---------------------------+----------+

3. 删掉其中的某个 queue: 

rabbitmqadmin purge queue name=aa.notification.email

4. 查看当前的 queue 状态(详细):

$ rabbitmqadmin list queues name node messages messages_ready messages_unacknowledged
+----------------------------+----------------+----------+----------------+-------------------------+
|            name            |      node      | messages | messages_ready | messages_unacknowledged |
+----------------------------+----------------+----------+----------------+-------------------------+
| xx.m2atching            | rabbit@aa-2 | 0        | 0              | 0                       |
| xx.n2otification.email  | rabbit@aa-2 | 0        | 0              | 0                       |
| xx.o2rder.processor     | rabbit@aa-2 | 0        | 0              | 0                       |
+----------------------------+----------------+----------+----------------+-------------------------+

订阅/RSS Feed

Subscribe

分类/category