Skip to content

Latest commit

 

History

History
 
 

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
Build Status

Zookeeper overview

"ZooKeeper is a centralized service for maintaining configuration information, naming, providing distributed synchronization, and providing group services."

See the Zookeeper site for more information. Spring Cloud Zookeeper also builds on the Apache Curator project which started life at Netflix.

Spring Cloud Zookeeper Features

  • Spring Cloud DiscoveryClient implementation

    • supports Ribbon and Zuul

  • Zookeeper based PropertySource loaded during the 'bootstrap' phase.

Running the sample

  1. Install zookeeper (On a mac with homebrew brew install zookeeper).

  2. Start zookeeper.

  3. Verify zookeeper is running.

  4. Run mvn --settings .settings.xml package this will bring in the required spring cloud maven repositories and build

  5. Run java -jar spring-cloud-zookeeper-sample/target/spring-cloud-zookeeper-sample-1.0.5.BUILD-SNAPSHOT.jar

  6. Visit http://localhost:8080, verify that {"serviceId":"testZookeeperApp","host":"<yourhost>","port":8080} results

  7. run java -jar spring-cloud-zookeeper-sample/target/spring-cloud-zookeeper-sample-1.0.5.BUILD-SNAPSHOT.jar --server.port=8081

  8. visit http://localhost:8080 again, verify that {"serviceId":"testZookeeperApp","host":"<yourhost>","port":8081} eventually shows up in the results in a round robbin fashion (may take a minute or so).