I am trying to create the 2 nodes HornetQ cluster using <static-connectors> (its a active-active cluster)
Cluster is working fine, in following scenarios:
- Both hornetQ nodes are up. connecting client.
- shutting down one HornetQ server. ***Outcome: client fails over to other HornetQ server.
- restart 1st HornetQ, shutdown other hornetQ ***Outcome: client fails over to other HornetQ server.
- restart 2nd HornetQ, shutdown 1st hornetQ ***Outcome: client fails over to other HornetQ server.
Conclusion: IF client was started when both hornetQ servers were up and running, failover working fine.
Cluster is failing in following scenario:
- One hornetQ server is up, connect client.
- start other hornetQ server, shutdown first hornetQ server. *** Outcome: client is logging exception that HornetQ server is down, trying to connect the same.
Conclusion: If Client was started when Only one HornetQ server was up. now even if other node of cluster is started later, client is not able to failover to active node.
On the Messaging server node, configuration is mentioned below, Where "netty-connector-cluster-node" is FQDN for other Hornetq server.
<netty-connector name="netty-connector-cluster-node" socket-binding="jms-cluster-node"/>
On the client machine, configuration is as mentioned below, where netty-connector-cluster-node-1, netty-connector-cluster-node-2 are FQDN for both HornetQ servers.
<netty-connector name="netty-connector-cluster-node-1" socket-binding="jms-cluster-node-1"/>
<netty-connector name="netty-connector-cluster-node-2" socket-binding="jms-cluster-node-2"/>