You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We will fix that by using a Hazelcast Cluster Manager. There are two modules that provide Hazelcast Cluster Manager:
231
-
232
-
- `io.vertx:vertx-hazelcast` - this module is maintained by the Vert.x team, with contributions from Hazelcast, and is built on top of open-source Hazelcast
233
-
- `com.hazelcast:vertx-hazelcast-enterprise` - this module is maintained by the Hazelcast team and is built on top of the `vertx-hazelcast` but uses Hazelcast Enterprise instead. You need an enterprise license to use Hazelcast Enterprise.
234
-
235
-
You can use either module for most of this tutorial. At the end of this tutorial you will need the `vertx-hazelcast-enterprise` module.
236
-
237
-
NOTE: You can get your trial key at https://hazelcast.com/get-started/?utm_source=docs-website[hazelcast.com] or you can use `vertx-hazelcast` and a community edition of Hazelcast.
We will fix that by using a Hazelcast Cluster Manager. This resides in the `io.vertx:vertx-hazelcast` module, which is maintained by the Vert.x team with contributions from Hazelcast and is based on Hazelcast {open-source-product-name}.
249
231
250
232
Change the following part of the `start` method:
251
233
@@ -276,8 +258,6 @@ We also need to provide a Hazelcast configuration file, and create a file cluste
The module `vertx-hazelcast-enterprise` provides a different implementation of the `io.vertx.core.shareddata.Counter` and `io.vertx.core.shareddata.Lock` data structures. The implementation in `vertx-hazelcast` is based on the IMap data structure and provides guarantees defined in the xref:architecture:data-partitioning.adoc#best-effort-consistency[Best-effort consistency] section. This means that under certain network partition conditions the counter doesn't provide strong consistency guarantees and can generate duplicate values.
428
-
429
-
The module `vertx-hazelcast-enterprise` uses the CP Subsystem from {enterprise-product-name} to implement the Lock and Counter.
430
-
431
-
NOTE: For the rest of this tutorial you need to have an {enterprise-product-name} license.
Enable the CP subsystem, and in cluster.xml change the value of the `` property to `3`:
454
-
455
-
[source,xml]
456
-
----
457
-
<cp-member-count>3</cp-member-count>
458
-
----
459
-
460
-
You need to start at least 3 instances for the cluster to form successfully. For complete documentation, see the xref:cp-subsystem:cp-subsystem.adoc[CP Subsystem] section.
Copy file name to clipboardExpand all lines: docs/modules/integrate/pages/integrate-with-vertx.adoc
+5-73Lines changed: 5 additions & 73 deletions
Original file line number
Diff line number
Diff line change
@@ -13,66 +13,19 @@ In Vert.x a cluster manager is used for various functions including:
13
13
- Distributed Locks
14
14
- Distributed Counters
15
15
16
-
There are 2 modules to choose from:
17
-
- `io.vertx:vertx-hazelcast` - this module is part of Vert.x and is maintained by the Vert.x team with contributions from Hazelcast developers. This module is licensed under the Apache 2 license.
18
-
19
-
- `com.hazelcast:vertx-hazelcast-enterprise` - this module is built on top of `vertx-hazelcast` and leverages functionality of {enterprise-product-name} to implement some of the cluster manager functionality (e.g. it uses the CP Subsystem to implement strongly consistent `io.vertx.core.shareddata.Lock` and `io.vertx.core.shareddata.Counter`).
20
-
21
-
== Using Vert.x Hazelcast Enterprise Cluster Manager
22
-
[.enterprise]*Enterprise*
23
-
24
-
To use the Vert.x Hazelcast Enterprise Cluster Manager, add the following dependency to your Vert.x application:
The `io.vertx:vertx-hazelcast` module is part of Vert.x and is maintained by the Vert.x team with contributions from Hazelcast. This module is licensed under the Apache 2 license.
60
17
61
18
To enable clustering, start your Vert.x application with the `-cluster` parameter.
62
19
63
-
=== Configuration
20
+
== Configuration
64
21
65
22
Provide a file named `cluster.xml` on your classpath to configure a Hazelcast instance used by Vert.x.
66
23
67
-
To take advantage of the Lock and Counter data structures backed by the CP subsystem, you need to enable the xref:cp-subsystem:cp-subsystem.adoc[CP Subsytem].
68
-
69
24
For other configuration methods see the link:https://vertx.io/docs/vertx-hazelcast/java/#configcluster[Vert.x documentation].
70
25
71
26
=== Versioning and Hazelcast compatibility
72
27
73
-
The Vert.x Hazelcast Enterprise module follows the versioning of Vertx. If you use an `x.y.z` version of Vert.x, you should use an `x.y.z` version of `vertx-hazelcast-enteprise`.
74
-
75
-
The `vertx-hazelcast-enteprise` module is compatible with all Hazelcast versions supported at the time of the release of the `vertx-hazelcast-enteprise` module unless stated otherwise.
28
+
The Vert.x Hazelcast module follows the versioning of Vertx. If you use an `x.y.z` version of Vert.x, you should use an `x.y.z` version of `vertx-hazelcast`.
76
29
77
30
While older versions may work, such configurations are not supported.
78
31
@@ -89,7 +42,7 @@ You can change the Hazelcast dependency to any version of Hazelcast you need, e.
89
42
90
43
NOTE: The old versions may not be supported by Hazelcast anymore and don't receive any patches.
91
44
92
-
There are multiple ways to replace the transitive dependency. The most reliable way is to exclude the `com.hazelcast:hazelcast` transitive dependency of the `vert-hazelcast` module and add a direct dependency on `com.hazelcast:hazelcast` to the pom.xml of your project.
45
+
There are multiple ways to replace the transitive dependency. The most reliable way is to exclude the `com.hazelcast:hazelcast` transitive dependency of the `vertx-hazelcast` module and add a direct dependency on `com.hazelcast:hazelcast` to the pom.xml of your project.
93
46
94
47
[source,xml]
95
48
----
@@ -108,25 +61,4 @@ There are multiple ways to replace the transitive dependency. The most reliable
0 commit comments