[rabbitmq-discuss] How to synchronize the RabbitMQ exchanges?

Simon MacMullen simon at rabbitmq.com
Mon Dec 17 09:27:03 GMT 2012


On 15/12/2012 3:07PM, 王俊波 wrote:
> Hi,
> Suppose I have created two or more RabbitMQ nodes. For simplicity two
> nodes: X and Y. And they are NOT within the same cluster due to the
> WAN. Now our applications will declare exchanges dynamically via Java
> client libraries on node X. Is there any way that the same exchanges are
> declared on Y automatically? Maybe the queues as well.
> a constraint: no messages sent to X are copied to Y because we cannot
> handle duplicate messages up to now.
>
> The federation plugin seems be a choice, but I'm not sure weather it works.

Hi! The federation plugin definitely works :-) but I don't think it's 
what you want; it will transfer messages...

If you want to sync two brokers without transferring messages at all 
then your best bet is to write a script to export definitions at X 
(using the mgmt plugin /api/definitions), transfer the config JSON to Y, 
and reapply it at Y.

Cheers, Simon


More information about the rabbitmq-discuss mailing list