0
在RabbitMQ中,是否有一種簡單/方便的方式將具有綁定和隊列的自定義交換從一個虛擬主機遷移到另一個虛擬主機。 (虛擬主機:開發到VHOST:階段)一種將RabbitMQ交換從一個虛擬主機遷移到另一個虛擬主機的方法
感謝
在RabbitMQ中,是否有一種簡單/方便的方式將具有綁定和隊列的自定義交換從一個虛擬主機遷移到另一個虛擬主機。 (虛擬主機:開發到VHOST:階段)一種將RabbitMQ交換從一個虛擬主機遷移到另一個虛擬主機的方法
感謝
由於版本3.6.1
能夠Export/import config on virtual host level。
無法導出一個特定的Exchange。
但你可以採取通過HTTP API
交易所defition使用:
http://localhost:15672/api/exchanges/vhost/name/bindings/source
例如: http://localhost:15672/api/exchanges/%2f/my_company/bindings/source
你會得到一個JSON,如:
[
{
source: "my_company",
vhost: "/",
destination: "amq.gen-yZGNV22TwLcP3K-X69Yjyw",
destination_type: "queue",
routing_key: "#",
arguments: { },
properties_key: "%23"
},
{
source: "my_company",
vhost: "/",
destination: "my.queue",
destination_type: "queue",
routing_key: "#",
arguments: { },
properties_key: "%23"
}
]