rabbitmq如何使用命令行创建队列

1.下载rabbitmqadmin工具

wget http://localhost:15672/cli/rabbitmqadmin
chmod +x rabbitmqadmin

2.创建队列
将 {username} 和 {password} 替换为你的用户名和密码,{vhost_name} 替换为你的vhost名称,{queue name}替换为你的队列名称

./rabbitmqadmin -u {username} -p {password} -V {vhost_name} declare queue name={queue name}

3.验证队列是否创建成功
{vhost_name} 替换为你的vhost名称

./rabbitmqadmin -V {vhost_name} list queues

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: