code: @Override
  	public Promise subscribe(String channel) {
  		try {
  
  			// Create publisher
  			createOrGetPublisher(channel);
  
  			// Create subscriber
  			synchronized (subscribers) {
  				if (!subscribers.containsKey(channel)) {
  					TopicSubscriber subscriber = session.createSubscriber(session.createTopic(channel));
  					subscribers.put(channel, subscriber);
  					subscriber.setMessageListener((message) -> {
  						try {
  							BytesMessage msg = (BytesMessage) message;
  							byte[] bytes = new byte[(int) msg.getBodyLength()];
  							msg.readBytes(bytes);
  							received(channel, bytes);
  						} catch (Exception cause) {
  							logger.error("Unable to deserialize message!", cause);
  						}
  					});
  				}
  			}
  		} catch (Exception cause) {
  			return Promise.reject(cause);
  		}
  		return Promise.resolve();
  	}
docs: --- SUBSCRIBE ---