36.7. Cluster topologies
HornetQ clusters can be connected together in many different topologies, let us consider the two most common ones here:
36.7.1. Symmetric cluster
A symmetric cluster is probably the most common cluster topology, and you will be familiar with if you have had experience of JBoss Application Server clustering.
With a symmetric cluster every node in the cluster is connected to every other node in the cluster: every node in the cluster is no more than one hop away from every other node.
To form a symmetric cluster every node in the cluster defines a cluster connection with the attribute
max-hops
set to 1
. Typically the cluster connection will use server discovery in order to know what other servers in the cluster it should connect to, although it is possible to explicitly define each target server too in the cluster connection if, for example, UDP is not available on your network.
With a symmetric cluster each node knows about all the queues that exist on all the other nodes and what consumers they have. With this knowledge it can determine how to load balance and redistribute messages around the nodes.