此内容没有您所选择的语言版本。
36.5.2. Specifying a Static Cluster Server List
It is possible to define a symmetric cluster and not use static server discovery so each node can in turn discover available nodes. Configuring each cluster connection to have explicit knowledge of all the other nodes in the cluster is required.
Important
Fail-over is not supported for clusters defined using a static cluster server list. To support fail-over between cluster nodes, the nodes must be configured to use a discovery group.
Task: Specify Cluster Server List without Auto Discovery
Complete this task to specify a static cluster server list instead of using server auto discovery.
Prerequisites
- The
<JBOSS_HOME>/jboss-as/server/<PROFILE>/deploy/hornetq/hornetq-configuration.xml
file open, ready to add directives. - Understand the
hornetq-configuration.xml
configuration directives, as detailed in Section A.1.1, “hornetq-configuration.xml”.
Define Connectors
In thehornetq-configuraton.xml
file, insert a <connectors> directive block defining the remoting connector factory, the names of connectors, and the ports each connector will use.Each connector must use a unique port.Copy to Clipboard Copied! Toggle word wrap Toggle overflow Define Cluster Connection
Insert a <cluster-connection> directive block. The block must contain mandatory clustering directives, and the <connector-ref> directives set in the previous step. The <connector-ref> directives use the name attribute set in the <connector> directives.Copy to Clipboard Copied! Toggle word wrap Toggle overflow Result
The cluster is now defined with the directives required for server discovery using explicit server names.