code: @Override
  	public void connectionEvent(Connection conn, Events type) {
  		switch (type) {
  		case CONNECTED:
  
  			// The connection is permanently closed, either by manual action or
  			// failed reconnects
  			if (debug) {
  				logger.info("NATS connection opened.");
  			}
  			break;
  
  		case CLOSED:
  
  			// The connection lost its connection, but may try to reconnect if
  			// configured to
  			logger.info("NATS connection closed.");
  			if (started.get()) {
  				reconnect();
  			}
  			break;
  
  		case DISCONNECTED:
  
  			// The connection was connected, lost its connection and
  			// successfully reconnected
  			if (debug) {
  				logger.info("NATS pub-sub connection disconnected.");
  			}
  			break;
  
  		case RECONNECTED:
  
  			// The connection was reconnected and the server has been notified
  			// of all subscriptions
  			if (debug) {
  				logger.info("NATS connection reconnected.");
  			}
  			break;
  
  		case RESUBSCRIBED:
  
  			// The connection was told about new servers from, from the current
  			// server
  			if (debug) {
  				logger.info("NATS subscriptions re-established.");
  			}
  			break;
  
  		case DISCOVERED_SERVERS:
  
  			// Servers discovered
  			if (debug) {
  				logger.info("NATS servers discovered.");
  			}
  			break;
  
  		default:
  			break;
  		}
  	}
docs: --- DISCONNECT ---