RabbitMQ documentation声明:
Default Virtual Host and User
When the server first starts running, and detects that its database is uninitialised or has been deleted, it initialises a fresh database with the following resources:
a virtual host named /
api有类似的内容:
/api/exchanges/#vhost#/?name?/bindings
其中“?名字?”是一个特定的交换名称。
但是, 默认 -vhost #vhost#的内容是什么?
答案 0 :(得分:11)
写在这里:http://hg.rabbitmq.com/rabbitmq-management/raw-file/3646dee55e02/priv/www-api/help.html
由于默认虚拟主机名为“/”,因此需要将其编码为“%2f”。
这样:
/api/exchanges/%2f/{exchange_name}/bindings/source
全:
http://localhost:15672/api/exchanges/%2f/test_ex/bindings/source
结果:
[{"source":"test_ex","vhost":"/","destination":"test_queue","destination_type":"queue","routing_key":"","arguments":{},"properties_key":"~"}]