code: protected void disconnect() {
  		if (client != null) {
  			try {
  				client.stop();
  			} catch (Exception ignored) {
  			}
  		}
  		synchronized (publishers) {
  			for (TopicPublisher publisher : publishers.values()) {
  				try {
  					publisher.close();
  				} catch (Exception ignored) {
  				}
  			}
  			publishers.clear();
  		}
  		synchronized (subscribers) {
  			for (TopicSubscriber subscriber : subscribers.values()) {
  				try {
  					subscriber.close();
  				} catch (Exception ignored) {
  				}
  			}
  			subscribers.clear();
  		}
  		if (session != null) {
  			try {
  				session.close();
  			} catch (Exception ignored) {
  			}
  			session = null;
  		}
  		if (client != null) {
  			try {
  				client.close();
  			} catch (Exception ignored) {
  			}
  			client = null;
  		}
  	}
docs: --- DISCONNECT ---