This simple example demonstrates how to use the zookeeper addon to tesla-microservice.
For testing you can run zookeeper locally.
- Download from zookeeper.apache.org and unpack
- start with
bin/zkServer.sh - connect with
bin/zkCli.sh - create some data under the path
/foowithcreate /foo bar.
- Clone the repo.
- If you are running zookeeper locally,
resources/default.propertiesalready has a valid connection string:zookeeper.connect=localhost:2181you can override it with an environment variable:ZOOKEEPER_CONNECT=localhost:2182. - Start the application with
lein run. - Access the example service under
http://localhost:8080/exampleandhttp://localhost:8080/example/foo. The latter will report which data, if any, zookeeper has for the path/foo. - In
bin/zkCli.shtry changing the data withset /foo bazand reload the page.
Apache License