Uploaded image for project: 'Java Couchbase JVM Core'
  1. Java Couchbase JVM Core
  2. JVMCBC-282

NodeDisconnectedEvents not being sent to event subscriber when a node in a cluster is stopped

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Fixed
    • Major
    • 1.2.4
    • None
    • None
    • None

    Description

      I setup a simple test using a 3 node cluster where I subscribed to the event bus and then stopped a node. I was expecting to see NodeDisconnectedEvents (and then a NodeConnectedEvent when I started it again) but I did not. A simple code example of what I did is as follows:

      	import com.couchbase.client.java._
          import com.couchbase.client.java.env.DefaultCouchbaseEnvironment
          import com.couchbase.client.core.event.CouchbaseEvent
      	
      	object EventTest extends App{
                import rx.lang.scala._
                import rx.lang.scala.JavaConversions._      
      	  import collection.JavaConversions._
      	  
      	  val pass = "foo"
      	  val serverUris = List("build04.bo.aquto.internal", "build02.bo.aquto.internal", "build01.bo.aquto.internal")
      	  val password = "aqut0r0cks"
      	    
      	  val env = DefaultCouchbaseEnvironment.create()
      	  val busObs:Observable[CouchbaseEvent] = env.eventBus().get
      	  busObs.subscribe(ev => println(ev))
      	  
      	  val cluster = CouchbaseAsyncCluster.create(env, serverUris)
      	  val bucket = cluster.openBucket("cache", pass)
      	    	  	  
      	  Thread.sleep(60000)
      	}
      

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            daschl Michael Nitschinger
            cbax007 cbax007
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty