19.4.4. Switch UDP to TCP for HornetQ Clustering

The following example uses the default standalone-full-ha.xml file shipped with EAP 6.


If security is enabled, you must set the cluster-password attribute:
  1. Remove the broadcast-groups and discovery-groups:

        <broadcast-group name="bg-group1">
        <discovery-group name="dg-group1">
  2. Optionally, remove the "messaging-group" socket-binding:

    <socket-binding name="messaging-group" port="0" multicast-address="${jboss.messaging.group.address:}" multicast-port="${jboss.messaging.group.port:9876}"/>
  3. Configure the appropriate Netty connector(s) - one for each of the other nodes in the cluster.

    For example, if the cluster is 3 nodes then configure 2 Netty connectors, etc., if the cluster is 2 nodes then configure 1 Netty connector, etc. Here is a sample configuration for a 3-node cluster:
    <netty-connector name="other-cluster-node1" socket-binding="other-cluster-node1"/>
    <netty-connector name="other-cluster-node2" socket-binding="other-cluster-node2"/>
  4. Configure the related socket bindings.


    The system property substitution can be used for either "host" or "port", if required.
    <outbound-socket-binding name="other-cluster-node1">
        <remote-destination host="otherNodeHostName1" port="5445"/>
    <outbound-socket-binding name="other-cluster-node2">
        <remote-destination host="otherNodeHostName2" port="5445"/>
  5. Configure the cluster-connection to use these connectors instead of the discovery-group, which is used by default:

    <cluster-connection name="my-cluster">
    This process has to be repeated on each of the cluster nodes so that each node has connectors to every other node in the cluster.


    Do not configure a node with a connection to itself. This is considered as a misconfiguration.