358.4.
// the file endpoint we want to consume from String url = "file:target/inbox?delete=true"; // use the zookeeper master component in the clustered group named myGroup // to run a master/slave mode in the following Camel url from("zookeeper-master:myGroup:" + url) .log(name + " - Received file: ${file:name}") .delay(delay) .log(name + " - Done file: ${file:name}") .to("file:target/outbox");
MasterComponent master = new MasterComponent(); master.setZooKeeperUrl("myzookeeper:2181");
export ZOOKEEPER_URL = "myzookeeper:2181"