WildFly HornetQ Cluster Connection Configuration: Difference between revisions
Line 12: | Line 12: | ||
... | ... | ||
<cluster-connections> | <cluster-connections> | ||
<cluster-connection name="load-balancing-to-lb2"> | <cluster-connection name="load-balancing-to-lb2-and-lb3"> | ||
<address>jms</address> | <address>jms</address> | ||
<connector-ref>netty-inbound</connector-ref> | <connector-ref>netty-inbound</connector-ref> | ||
Line 20: | Line 20: | ||
<max-hops>1</max-hops> | <max-hops>1</max-hops> | ||
<static-connectors> | <static-connectors> | ||
<connector-ref> | <connector-ref>lb2</connector-ref> | ||
<connector-ref>lb3</connector-ref> | |||
</connector-ref> | |||
</static-connectors> | </static-connectors> | ||
</cluster-connection> | </cluster-connection> |
Revision as of 00:58, 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-and-lb3"> <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>lb2</connector-ref> <connector-ref>lb3</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 to be sent to the target of this cluster connection. This insures that the target node knows the connector information of the initiator node. It must be the name of a connector declared in the <connectors> configuration element of the initiator (this) HornetQ node.
check-period
The time period in milliseconds which is used to verify if a cluster connection has failed to receive pings from the target. The default value is 30,000 milliseconds.
connection-ttl
max-hops
In symmetric clusters, max-hops must be set to 1.