WildFly HornetQ Cluster Connection Configuration: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 39: Line 39:
==<tt>connector-ref</tt>==
==<tt>connector-ref</tt>==


The <tt>connector-ref</tt> is a required attribute that contains the connector value sent to the target node of this cluster connection so it knows the connector information of the cluster connection initiator.
The <tt>connector-ref</tt> is a required attribute that contains the connector value sent to the target node of this cluster connection so it knows the connector information of the cluster connection initiator. It must be the name of a connector declared in the <tt><connectors></tt> configuration element of the initiator (this) HornetQ node.


==<tt>max-hops</tt>==
==<tt>max-hops</tt>==


In [[WildFly_HornetQ-Based_Messaging_Subsystem_Concepts#Symmetric_Cluster|symmetric clusters]], <tt>max-hops</tt> must be set to 1.
In [[WildFly_HornetQ-Based_Messaging_Subsystem_Concepts#Symmetric_Cluster|symmetric clusters]], <tt>max-hops</tt> must be set to 1.

Revision as of 00:52, 14 May 2016

Internal

Overview

A cluster connections represents an unidirectional communication channel between nodes. More details about the cluster connection concepts are available here: Cluster Connection Concepts. It is configured as follows:

<subsystem xmlns="urn:jboss:domain:messaging:1.4">
  <hornetq-server name="active-hq-node">
    ...
    <cluster-connections>
      <cluster-connection name="load-balancing-to-lb2">
        <address>jms</address>
        <connector-ref>netty-inbound</connector-ref>
        <retry-interval>500</retry-interval>
        <use-duplicate-detection>true</use-duplicate-detection>
        <forward-when-no-consumers>true</forward-when-no-consumers>
        <max-hops>1</max-hops>
        <static-connectors>
          <connector-ref>
            load-balancing-node-lb2
          </connector-ref>
        </static-connectors>
      </cluster-connection>
    </cluster-connections>
   ...
   </hornetq-server>
</subsystem>

Configuration Elements

address

Each cluster connection only applies to messages sent to an address that starts with this value. The address can be any value and there can be many cluster connections with different address values, balancing messages for those addresses, potentially to different clusters of servers. This does not use wild card matching

connector-ref

The connector-ref is a required attribute that contains the connector value sent to the target node of this cluster connection so it knows the connector information of the cluster connection initiator. It must be the name of a connector declared in the <connectors> configuration element of the initiator (this) HornetQ node.

max-hops

In symmetric clusters, max-hops must be set to 1.