-
Notifications
You must be signed in to change notification settings - Fork 1
/
explicitIpPortRegistrator-example.xml
73 lines (62 loc) · 3.04 KB
/
explicitIpPortRegistrator-example.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
<?xml version="1.0" encoding="UTF-8"?>
<hazelcast id="hazelcast-consul-discovery"
xsi:schemaLocation="http://www.hazelcast.com/schema/config hazelcast-config-3.6.xsd"
xmlns="http://www.hazelcast.com/schema/config"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<!-- NOTE! any XML value below can be variables that will be fetched from
-D system properties @see http://docs.hazelcast.org/docs/3.6-EA/manual/html-single/index.html#using-variables -->
<group>
<name>hazelcast-consul-discovery-spi</name>
<password>haz3lcast1</password>
</group>
<properties>
<property name="hazelcast.discovery.enabled">true</property>
<property name="hazelcast.shutdownhook.enabled">false</property>
</properties>
<network>
<port auto-increment="true">5701</port>
<join>
<multicast enabled="false"/>
<aws enabled="false"/>
<tcp-ip enabled="false"/>
<discovery-strategies>
<discovery-strategy enabled="true"
class="cc.springcloud.hazelcast.discovery.consul.ConsulDiscoveryStrategy">
<properties>
<property name="consul-host">localhost</property>
<property name="consul-port">8500</property>
<property name="consul-service-name">hz-discovery-test-cluster</property>
<property name="consul-healthy-only">true</property>
<property name="consul-service-tags">hazelcast,test1</property>
<property name="consul-discovery-delay-ms">10000</property>
<property name="consul-acl-token">761F2179-0479-445A-9E75-68E63AEE8816</property>
<property name="consul-ssl-enabled">true</property>
<property name="consul-ssl-server-cert-file-path">/path/to/consul.self.signed.cert</property>
<property name="consul-key-store-instance-type"></property>
<property name="consul-cert-password"></property>
<property name="consul-key-store-path"></property>
<property name="consul-key-store-password"></property>
<property name="consul-registrator">
cc.springcloud.hazelcast.discovery.consul.ExplicitIpPortRegistrator
</property>
<property name="consul-registrator-config"><![CDATA[
{
"registerWithIpAddress":"192.168.1.102",
"registerWithPort":5701,
"Check": {
"Script": "nc -z #MYIP #MYPORT",
"Interval": 30s,
"Timeout": 30s,
"TCP": "#MYIP:#MYPORT",
"DeregisterCriticalServiceAfter": null,
"TLSSkipVerify": false,
"Status": null
}
}
]]></property>
</properties>
</discovery-strategy>
</discovery-strategies>
</join>
</network>
</hazelcast>