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

时间:2019-01-14 10:54:55

标签: distributed-computing hazelcast

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

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 个答案:

答案 0 :(得分:0)

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