With the architecture described it seems difficult to me, because indeed you need to reconfigure the slave as master and then you will have a certain outage.
HornetQ HA is provided via a live-backup pair and load-balancing is provided via a cluster.
If you want both HA and load-balancing then you will need 2 live-backup pairs clustered together.
Source: https://developer.jboss.org/thread/254232
You can reference the master not by the hostname but using a virtual IP address, so that in case the master is down, you can reconfigure one of the slaves as master, and start the virtual ip so you don't have to reconfigure the rest of the slaves. (To keep HA even when the master is down, you want to have 2 slaves, so that you can restart one of them as master and still one will be running).
Another way to achieve the same result is with a DNS hostname specific for the master that you can reconfigure to point to a different IP if one host is down. Since DNS is cached, this entries should better be in the 'hosts' file.
If 3 hosts per HA-domain is too much hardware, you can accomplish this easier with virtual servers without the need to purchase more hardware.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With