-Re: watchers and multiple notifications
Michi Mutsuzaki 2012-11-30, 05:01
> 1. Does this mean, once I set the watch again I am guaranteed to receive
> one notification for all multiple events that I missed in the mean time
> immediately? Or do I get a notification only when there is a new event?
Latter. You will not get notifications for events that happened
between getting the event and setting the watch.
> 2. Let say I got an event, before start handling the event I set the watch
> again and got busy in the callback. Meanwhile I have multiple events. Are
> these events result into one notification or multiple notifications?
You will get a single notification for the first event. You will not
get any more notifications for subsequent events until you reset the
> In my system, I don't want to miss a notification at the same time I want
> to handle an event just once if there are multiple notifications triggered
> on it.
As far as I know, this is not possible with current zookeeper. I
remember somebody was talking about persistent watches in the last
zookeeper meetup, but I don't think the patch has been committed.