The -Z flag can only be specified once on the moxi command-line, so it can get really long with key-value configuration pairs. Here's a long example:
./moxi -Z port_listen=11311,concurrency=8,cycle=100,wait_queue_timeout=5000,downstream_timeout=5000 \ http://membase1:8091/pools/default/bucketsStreaming/shoppingCarts
At this point, you can put the entire -Z key-value configuration list into a separate file, and tell moxi to load the -Z configuration from that file. For example:
./moxi -Z ./relative/path/to/config_file http://membase1:8091/pools/default/bucketsStreaming/shoppingCarts ./moxi -Z /absolute/path/to/config_file http://membase1:8091/pools/default/bucketsStreaming/shoppingCarts
The contents of the config file still needs to be key=value pairs and comma-separated, but may have extra whitespace and line breaks for readability. Here's an example -Z config file:
port_listen = 11311, concurrency = 8, cycle = 100, wait_queue_timeout = 5000, downstream_timeout = 5000,The REST/HTTP URL's may also be placed into their own configuration file. It turns out the way we've been specifying REST/HTTP URL's so far in this document is actually just a convenience shorthand for the following (lowercase) -z url flag. We can the -z flag a cluster configuration flag. For example:
./moxi -z url=http://membase1:8091/pools/default/bucketsStreamingThe above is exactly the same as the more convenient:
./moxi http://membase1:8091/pools/default/bucketsStreamingHowever, the -z can also point to a separate file:
./moxi -z ./relative/path/to/lowercase-z-config-file ./moxi -z /absolute/path/to/lowercase-z-config-fileThe contents of the "lowercase z config file" would look like:
url = http://membase1:8091/pools/default/bucketsStreamingMultiple URL's can be specified in the cluster REST/URL config file, but must be separated by '|' (vertical 'pipe' bar) characters (because the comma character is already used as a key=value delimiter):
url = http://membase1:8091/pools/default/bucketsStreaming|http://membase2:8091/pools/default/bucketsStreaming|http://membase3:8091/pools/default/bucketsStreamingFinally, you can use both capital Z and lowercase z flags, to specify both kinds of config files:
./moxi -Z ./moxi.cfg -z ./cluster.cfg