EventBus and NodeDisconnectedEvent

I’ve been playing around with the new event bus functionality introduced 2.1.0 (via 2.1.2). I can see that when I bring up the client I get the proper node connected events for my 3 nodes. Now, when I take one of those nodes down, somewhere within the storm of exceptions that start I was expecting to also get a NodeDisconnectedEvent in my event subscriber Observable but I did not. The only way I can get this event right now seems to be to explicitly disconnect the cluster. I would like to know when any of my jvms loses connectivity to a particular node and this seemed the best way to do it. Is this behaving as expected or should I be getting disconnect events when I lose connectivity to a node (and then connected events later when the node comes back up)?

Every time you see the “node disconnected” log you should get such an event. If not, it’s likely an Issue (https://github.com/couchbase/couchbase-jvm-core/blob/master/src/main/java/com/couchbase/client/core/node/CouchbaseNode.java#L121).

Can you try with master? We recently added proper sync to the event bus which might help. If not, can you please raise a JCBC? Thanks!

I can give it a shot with master as I have that from the last item we worked on. Trying now…

It didn’t seem to work with master. I will raise an issue shortly.

Okay, ticket has been created:


1 Like

Thanks! Let’s take it from there…