Reputation: 7620
In RabbitMQ, is there an easy/simple way to migrate the custom exchanges with bindings and queues from one Vhost to Another. (Vhost:dev to Vhost:stage)
thanks
Upvotes: 0
Views: 1931
Reputation: 22750
Since the version 3.6.1
is possible to Export/import config on virtual host level.
It is not possible to export one specific Exchange.
But you can take the Exchange defition through the HTTP API
Using :
http://localhost:15672/api/exchanges/vhost/name/bindings/source
for example:
http://localhost:15672/api/exchanges/%2f/my_company/bindings/source
you will get a json like:
[
{
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"
}
]
Upvotes: 1