0

Currently, I am using Zookeeper for sharing configurations between different JVMs running on different nodes. In one of the node, the thread is waiting for some data to be written to specific zookeeper path and I have added watcher too to look out for any changes. On the other node, thread is writing data to that path and as soon as data is written, this thread should interrupt the waiting thread and start executing the remaining process.

For this, I have implemented watcher. As the thread is writing data to certain path, the watcher is being called and i get to see the log info. But the other thread (the one which is waiting) watcher is not getting called. I am not able to track why I am getting this issue.

I want to know that if its possible what I am trying to do? If not, any help with sharing CountDownLatch between above mentioned threads will be appreciated.

Thanks!

Mohini
  • 97
  • 10
  • 2
    think about sockets... – ΦXocę 웃 Пepeúpa ツ May 11 '17 at 13:12
  • Socket for what? I am doing all of this just to check when my Server socket is up and then only Client should send connection request. The two threads i have mentioned is CLient and server thread. – Mohini May 11 '17 at 13:14
  • You'll probably need to show some code from the client and server side before anyone can determine why your Zookeeper setup isn't working. – G_H May 11 '17 at 13:22
  • In a case which I think is similar, I used activeMQ topic to communicate between a running process on server A, and a waiting monitor on server B. Server B has a monitor waiting to be notified once the process ends on server A. – Tomer A May 11 '17 at 13:40

0 Answers0