简体   繁体   中英

How does rabbitmq mirrored queue works?

If I'm about to create a mirrored queue in a node within a cluster and create mirrors in some other nodes in the same cluster. Suppose I hit the ip address(or make use of queue name) of that master queue every time I send the message to the queue and if the master node fails will the message will be sent to the oldest mirrored queue by hitting the same ip address(or queue name)?

RabbitMQ will not automagically failover a slave node to the same IP address of the (previous) master. The IP address of the broker is provided by the host O/S (either statically or via DHCP), and RabbitMQ can't do much about it.

You can setup a kind of failover yourself, with normal IT means or failing over servers.

Alternatively, some RabbitMQ client libraries or wrappers support multiple hosts, and will send messages to a secondary broker if they detect that the master is unreachable. You can also code such behavior yourself.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM