Skip to content

ZooKeeper Dynamic Configuration

Chris Fregly edited this page Jun 17, 2013 · 8 revisions

Configuring ZooKeeperConfigurationSource

  • This implementation requires the path to the ZK root parent node that contains the hierarchy of configuration properties. An example is /[my-app]/config
  • Properties are direct ZK child nodes of the root parent ZK node. An example ZK child property node is /[my-app]/config/com.fluxcapacitor.my.property
  • The value is stored in the ZK child property node and can be updated at any time.
  • All servers will receive a ZK Watcher callback and automatically update their value similar to other dynamic configuration sources (ie. DynamoDB, etc.)
  • Any node created or updated under this node - even dynamically at runtime - will be accessible through the archaius dynamic property framework.

Example Configuration


archaius property name:  com.fluxcapacitor.my.property
ZK child node under the //config parent root node:  /[my-app]/config/com.fluxcapacitor.my.property

The value is retrieved from the /[my-app]/config/com.fluxcapacitor.my.property ZK node above.

Examples in Practice