Skip to content
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

Documentation: note in case you're working with Zookeeper 3.4.x #171

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
54 changes: 54 additions & 0 deletions docs/src/main/asciidoc/spring-cloud-zookeeper.adoc
Expand Up @@ -14,6 +14,54 @@ include::intro.adoc[]
See the http://zookeeper.apache.org/doc/current/zookeeperStarted.html[installation
documentation] for instructions on how to install Zookeeper.

Spring Cloud Zookeeper uses Apache Curator behind the scenes.
While Zookeeper 3.5.x is still considered "beta" by the Zookeeper development team,
the reality is that it is used in production by many users.
However, Zookeeper 3.4.x is also used in production.
Prior to Apache Curator 4.0, both versions of Zookeeper were supported via two versions of Apache Curator.
Starting with Curator 4.0 both versions of Zookeeper are supported via the same Curator libraries.

In case you are integrating with version 3.4 you need to change the Zookeeper dependency
that comes shipped with `curator`, and thus `spring-cloud-zookeeper`.
To do so simply exclude that dependency and add the 3.4.x version like shown below.

.maven
[source,xml,indent=0]
----
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-zookeeper-all</artifactId>
<exclusions>
<exclusion>
<groupId>org.apache.zookeeper</groupId>
<artifactId>zookeeper</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.zookeeper</groupId>
<artifactId>zookeeper</artifactId>
<version>3.4.12</version>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
</exclusion>
</exclusions>
</dependency>
----

.gradle
[source,groovy,indent=0]
----
compile('org.springframework.cloud:spring-cloud-starter-zookeeper-all') {
exclude group: 'org.apache.zookeeper', module: 'zookeeper'
}
compile('org.apache.zookeeper:zookeeper:3.4.12') {
exclude group: 'org.slf4j', module: 'slf4j-log4j12'
}
----

[[spring-cloud-zookeeper-discovery]]
== Service Discovery with Zookeeper

Expand All @@ -33,6 +81,9 @@ autoconfiguration that sets up Spring Cloud Zookeeper Discovery.
NOTE: For web functionality, you still need to include
`org.springframework.boot:spring-boot-starter-web`.

CAUTION: When working with version 3.4 of Zookeeper you need to change
the way you include the dependency as described <<spring-cloud-zookeeper-install,here>>.

=== Registering with Zookeeper

When a client registers with Zookeeper, it provides metadata (such as host and port, ID,
Expand Down Expand Up @@ -471,6 +522,9 @@ Including a dependency on
`org.springframework.cloud:spring-cloud-starter-zookeeper-config` enables
autoconfiguration that sets up Spring Cloud Zookeeper Config.

CAUTION: When working with version 3.4 of Zookeeper you need to change
the way you include the dependency as described <<spring-cloud-zookeeper-install,here>>.

=== Customizing

Zookeeper Config may be customized by setting the following properties:
Expand Down