rabbitmq web http 命令使用示例
更新时间:2024-03-07 19:06:53
PDF
本文仅介绍常用命令,更多信息请查看官方文档。
检查集群健康状态
curl -i -u guest:guest http://192.168.0.253:15672/api/healthchecks/node
创建 vhost
curl -i -u guest:guest -H “content-type:application/json” -XPUT http://192.168.0.253:15672/api/vhosts/foo
授权用户访问 vhost
curl -i -u guest:guest -H “content-type:application/json” -XPUT http://192.168.0.253:15672/api/permissions/foo/guest -d ‘{“configure”:”.*”,”write”:”.*”,”read”:”.*”}’
创建一个 queue ,发送消息,并消费消息
curl -i -u guest:guest http://192.168.0.253:15672/api/aliveness-test/foo