RabbitMQ

RabbitMQ is a message-queueing software called a message broker or queue manager. By definition, it is where queues can be defined, applications may connect to the queue and transfer a message onto it.

Mac下安装RabbitMQ

  1. 安装和相关的配置
brew install rabbitmq
 2. 运行rabbitmq-server

删除rabbitmq里面的队列

  1. 开启rabbitmq management plugin

rabitmq management plugin是一系列的相关管理工具,支持对rabbitmq server进行相关的管理,提供了相关的web可视化工具、CLI工具对rabbitmq server进行操作。

确认rabbitmq-plugins 存在, 通常在安装目录 (/usr/lib/rabbitmq/bin/)
$ which rabbitmq-plugins
$ sudo rabbitmq-plugins enable rabbitmq_management
打开 http://localhost:15672 可以看到Web UI界面, 使用默认的账号进行登录  guest: guest
  1. 使用rabbitmqadmin

The management plugins ships with a command line tool rabbitmqadmin which can perform the same actions as the web-based UI, and which may be more convenient for use when scripting

打开浏览器, 输入http://server-name:15672/cli/, 获得rabbitmqadmin脚本
保存下来后,将其保存到系统的运行路径,并赋予可执行的权限
$ cd /usr/local/bin
$ sudo wget http://server-name:15672/cli/
$ sudo chmod + x rabbitmqadmin
  1. 使用rabbitmqadmin进行消息队列的管理
$ sudo rabbitmqadmin list queues name
$ sudo rabbitmqadmin delete queue name='queuename'

重启rabbitmq node进行reset

Warning, the following command will delete any users and vhosts you have configured on your rabbit server

$ sudo rabbitmqctl stop_app 
$ sudo rabbitmqctl reset
$ sudo rabbitmqctl start_app

rest command: Removes the node from any cluster it belongs to, removes all the date from the management database, such as configured users and vhosts, and delete all persistent messages.

results matching ""

    No results matching ""