1) Deploy AMQ-7 in high availability with a master and a slave.
Find enclosed:
- the master broker configuration (broker-master.xml)
- the slave broker configuration (broker-slave.xml)
(please note these configurations rely on multicast being enabled in the OS)
2) Prepare an Interconnect router to connect to the master broker
find enclosed the configuration for the router:
3) Start the master broker, then start the slave broker. The logs should show the master active, and the slave as backup.
4) start the router.
With tracing enabled, you should see how the broker passes failover information when the router connects, as the example below:
"failover-server-list"=[{:hostname="192.168.1.64", :scheme="amqp", :port=62616, :"network-host"="192.168.1.64"}]
Please note how the failover hostname "192.168.1.64" comes from the slave configuration corresponding to the following entry:
<connectors>
<connector name="netty-connector">tcp://192.168.1.64:62616</connector>
</connectors>
When the router succeeds to connect to the master broker, you should see the autolinks activating:
2017-12-15 23:06:29.263263 +0000 ROUTER_CORE (info) Auto Link Activated 'autoLink/0' on connection broker1
2017-12-15 23:06:29.263366 +0000 ROUTER_CORE (info) Auto Link Activated 'autoLink/1' on connection broker1
2017-12-15 23:06:29.263405 +0000 ROUTER_CORE (info) Auto Link Activated 'autoLink/2' on connection broker1
2017-12-15 23:06:29.263415 +0000 ROUTER_CORE (info) Auto Link Activated 'autoLink/3' on connection broker1
5) Now, shutdown the master broker, and you should see the slave broker activating, When this happens, the router should failover to the slave but instead it logs the following:
2017-12-15 23:07:01.101509 +0000 ROUTER_CORE (info) Auto Link Deactivated 'autoLink/0' on connection broker1
2017-12-15 23:07:01.101561 +0000 ROUTER_CORE (info) Auto Link Deactivated 'autoLink/1' on connection broker1
2017-12-15 23:07:01.101572 +0000 ROUTER_CORE (info) Auto Link Deactivated 'autoLink/2' on connection broker1
2017-12-15 23:07:01.101615 +0000 ROUTER_CORE (info) Auto Link Deactivated 'autoLink/3' on connection broker1
2017-12-15 23:07:02.102991 +0000 SERVER (info) Connection to 192.168.1.64:5672 failed: proton:io Connection refused - disconnected 192.168.1.64:5672
2017-12-15 23:07:03.104682 +0000 SERVER (info) Connection to 192.168.1.64:5672 failed: proton:io Connection refused - disconnected 192.168.1.64:5672
It does not seem attempting to connect to the slave, but always to the master.