I have few doubts on how producer consumer recipe will work with Zookeeper.
All the examples I have seen so far have producers and consumers in the same java processes as separate thread. But the whole point of being distributed is to have different instances ( multiple ) of producer and consumer.
having different instances of producers and consumer means no local locks ( syntonization ) will be of any use.
Also because multiple processes are watching the same root queue node, they all will start processing a particular incoming entry.
What I am getting wrong here ???