이 콘텐츠는 선택한 언어로 제공되지 않습니다.

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”.
  1. Define Connectors

    In the hornetq-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.
    <connectors>
      <connector name="netty-connector">
        <factory-class>
         org.hornetq.core.remoting.impl.netty.NettyConnectorFactory
        </factory-class>
      <param key="port" value="5445"/>
    </connector>
    <!-- connector to the server1 -->
      <connector name="server1-connector">
        <factory-class>
         org.hornetq.core.remoting.impl.netty.NettyConnectorFactory
        </factory-class>
        <param key="port" value="5446"/>
      </connector>
    <!-- connector to the server2 -->
      <connector name="server2-connector">
        <factory-class>
         org.hornetq.core.remoting.impl.netty.NettyConnectorFactory
        </factory-class>
        <param key="port" value="5447"/>
      </connector>
    </connectors>
    Copy to Clipboard Toggle word wrap
  2. 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.
    <cluster-connections>
      <cluster-connection name="my-cluster">
        <address>jms</address>
        <connector-ref>netty-connector</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>server1-connector</connector-ref>
          <connector-ref>server2-connector</connector-ref>
        </static-connectors>
      </cluster-connection>
    </cluster-connections>
    Copy to Clipboard Toggle word wrap
  3. Result

    The cluster is now defined with the directives required for server discovery using explicit server names.
맨 위로 이동
Red Hat logoGithubredditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

Red Hat을 사용하는 고객은 신뢰할 수 있는 콘텐츠가 포함된 제품과 서비스를 통해 혁신하고 목표를 달성할 수 있습니다. 최신 업데이트를 확인하세요.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

Theme

© 2025 Red Hat