代码之家  ›  专栏  ›  技术社区  ›  simpleusr

Hazelcast 3.11客户端连接重试配置问题-

  •  0
  • simpleusr  · 技术社区  · 6 年前

    我正在尝试使用连接重试,如下所述:

    https://docs.hazelcast.org/docs/3.11/manual/html-single/index.html#configuring-client-connection-retry

    设置配置如下

     <connection-strategy async-start="true" reconnect-mode="ASYNC">
            <connection-retry enabled="true">
                <initial-backoff-millis>2000</initial-backoff-millis>
                <max-backoff-millis>60000</max-backoff-millis>
                <multiplier>3</multiplier>
                <fail-on-max-backoff>false</fail-on-max-backoff>
                <jitter>0.5</jitter>
            </connection-retry>
        </connection-strategy>
    

    出现以下错误:

    Factory method 'client' threw exception; nested exception is com.hazelcast.config.InvalidConfigurationException: cvc-complex-type.2.1: Element 'connection-strategy' must have no character or element information item [children], because the type's content type is empty.
    

    https://hazelcast.com/schema/client-config/hazelcast-client-config-3.11.xsd

    <xs:complexType name="connection-strategy">
    <xs:attribute name="async-start" type="xs:boolean" default="false" use="optional"/>
    <xs:attribute name="reconnect-mode" type="reconnect-mode" default="ON" use="optional"/>
    </xs:complexType>
    

    如何使用连接重试功能?

    谢谢

    当做

    1 回复  |  直到 6 年前
        1
  •  0
  •   simpleusr    6 年前

    这是由于我的应用程序中存在一个愚蠢的类路径问题。没有错误。很抱歉给您带来不便