-
Notifications
You must be signed in to change notification settings - Fork 96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Document Vert.x integration [DEX-172] #1280
Open
frant-hartm
wants to merge
20
commits into
hazelcast:main
Choose a base branch
from
frant-hartm:document-vertx
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
fd0e461
Document Vert.x integration [DEX-172]
frant-hartm fe42923
Update docs/modules/integrate/pages/integrate-with-vertx.adoc
frant-hartm 36fba00
Update docs/modules/integrate/pages/integrate-with-vertx.adoc
frant-hartm a50ac28
Update docs/modules/integrate/pages/integrate-with-vertx.adoc
frant-hartm 2bd46fd
Update docs/modules/integrate/pages/integrate-with-vertx.adoc
frant-hartm 0513b2f
Update docs/modules/integrate/pages/integrate-with-vertx.adoc
frant-hartm 4b47f05
Update docs/modules/integrate/pages/integrate-with-vertx.adoc
frant-hartm f85bf7a
Update docs/modules/integrate/pages/integrate-with-vertx.adoc
frant-hartm a2dd4ef
Update docs/modules/integrate/pages/integrate-with-vertx.adoc
frant-hartm 3848caf
Update docs/modules/integrate/pages/integrate-with-vertx.adoc
frant-hartm f98a091
Update docs/modules/integrate/pages/integrate-with-vertx.adoc
frant-hartm 675b663
Update docs/modules/integrate/pages/vertx-step-by-step-buide.adoc
frant-hartm 5f988b9
Update docs/modules/integrate/pages/vertx-step-by-step-buide.adoc
frant-hartm f18b2f6
Update docs/modules/integrate/pages/vertx-step-by-step-buide.adoc
frant-hartm 9afd2fa
Apply suggestions from code review
frant-hartm f036574
Fix typo in file name
frant-hartm 62101ff
Address review comments
frant-hartm b0e3bca
Update docs/modules/integrate/pages/vertx-step-by-step-guide.adoc
frant-hartm 41db70c
Merge branch 'main' into document-vertx
frant-hartm a121a33
Add snapshot repository to docs
frant-hartm File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,131 @@ | ||
= Integrate with Vert.x | ||
|
||
Vert.x is a reactive application toolkit for creating resource-efficient, concurrent, asynchronous and flexible applications on the JVM. | ||
|
||
Hazelcast integrates with Vert.x in a form of a cluster manager - the link:https://vertx.io/docs/vertx-hazelcast/java/[Hazelcast Cluster Manager]. | ||
|
||
|
||
In Vert.x a cluster manager is used for various functions including: | ||
|
||
- Discovery and group membership of Vert.x nodes in a cluster | ||
- Maintaining cluster-wide topic subscriber lists (so we know which nodes are interested in which event bus addresses) | ||
- Distributed Map support | ||
- Distributed Locks | ||
- Distributed Counters | ||
|
||
There are 2 modules to choose from: | ||
- `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. | ||
|
||
- `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`). | ||
|
||
== Using Vert.x Hazelcast Enterprise Cluster Manager | ||
|
||
To use the Vert.x Hazelcast Enterprise Cluster Manager, add the following dependency to your Vert.x application: | ||
|
||
[source,xml] | ||
---- | ||
<dependency> | ||
<groupId>com.hazelcast</groupId> | ||
<artifactId>vertx-hazelcast-enterprise</artifactId> | ||
<version>5.0.0-SNAPSHOT</version> | ||
</dependency> | ||
---- | ||
|
||
The dependency is located in the Hazelcast private repository, and you need to add that as well: | ||
|
||
[source,xml] | ||
---- | ||
<repositories> | ||
<repository> | ||
<id>hazelcast-private-repository</id> | ||
<name>Hazelcast Private Repository</name> | ||
<url>https://repository.hazelcast.com/release/</url> | ||
</repository> | ||
</repositories> | ||
---- | ||
|
||
Alternatively, if you need to use a snapshot version: | ||
|
||
[source,xml] | ||
---- | ||
<repositories> | ||
<repository> | ||
<id>hazelcast-private-snapshot-repository</id> | ||
<name>Hazelcast Private Snapshot Repository</name> | ||
<url>https://repository.hazelcast.com/snapshot/</url> | ||
</repository> | ||
</repositories> | ||
---- | ||
|
||
To enable clustering, start your Vert.x application with the `-cluster` parameter. | ||
|
||
=== Configuration | ||
|
||
Provide a file named `cluster.xml` on your classpath to configure a Hazelcast instance used by Vert.x. | ||
|
||
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]. | ||
|
||
For other configuration methods see the link:https://vertx.io/docs/vertx-hazelcast/java/#configcluster[Vert.x documentation]. | ||
|
||
=== Versioning and Hazelcast compatibility | ||
|
||
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`. | ||
|
||
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. | ||
|
||
While older versions may work, such configurations are not supported. | ||
|
||
== Using Vert.x Hazelcast Cluster Manager | ||
|
||
See the Vert.x Hazelcast Cluster Manager site for reference documentation of the `vertx-hazelcast` module. | ||
|
||
You can also follow our xref:vertx-step-by-step-guide.adoc[step-by-step guide]. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Suggest changing the name of the guide to "Get started with Vert.x guide" |
||
|
||
== Using a different Hazelcast version | ||
|
||
Due to Java compatibility reasons the Vert.x Hazelcast module doesn't depend on the latest version of Hazelcast. | ||
You can change the Hazelcast dependency to any version of Hazelcast you need, e.g. you can change it to Hazelcast 5.2.x for Java 8 compatibilty, or to the latest. | ||
|
||
NOTE: The old versions may not be supported by Hazelcast anymore and don't receive any patches. | ||
|
||
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. | ||
|
||
[source,xml] | ||
---- | ||
<dependency> | ||
<groupId>io.vertx</groupId> | ||
<artifactId>vertx-hazelcast</artifactId> | ||
<exclusions> | ||
<exclusion> | ||
<groupId>com.hazelcast</groupId> | ||
<artifactId>hazelcast</artifactId> | ||
</exclusion> | ||
</exclusions> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.hazelcast</groupId> | ||
<artifactId>hazelcast</artifactId> | ||
<version>5.5.0</version> | ||
</dependency> | ||
---- | ||
|
||
Similarly, for `vertx-hazelcast-enterprise`: | ||
|
||
[source,xml] | ||
---- | ||
<dependency> | ||
<groupId>com.hazelcast</groupId> | ||
<artifactId>vertx-hazelcast-enterprise</artifactId> | ||
<exclusions> | ||
<exclusion> | ||
<groupId>com.hazelcast</groupId> | ||
<artifactId>hazelcast</artifactId> | ||
</exclusion> | ||
</exclusions> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.hazelcast</groupId> | ||
<artifactId>hazelcast</artifactId> | ||
<version>5.5.0</version> | ||
</dependency> | ||
---- |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.