code: @Override
  	public void publish(String channel, Tree message) {
  		if (client != null) {
  			try {
  				if (debug && (debugHeartbeats || !channel.endsWith(heartbeatChannel))) {
  					logger.info("Submitting message to channel \"" + channel + "\":\r\n" + message.toString());
  				}
  				TopicPublisher publisher = createOrGetPublisher(channel);
  				BytesMessage msg = session.createBytesMessage();
  				msg.writeBytes(serializer.write(message));
  				if (transacted) {
  					synchronized (this) {
  						try {
  							publisher.send(msg, deliveryMode, priority, ttl);
  							session.commit();
  						} catch (Exception cause) {
  							try {
  								session.rollback();
  							} catch (Exception ignored) {
  							}
  							throw cause;
  						}
  					}
  				} else {
  					publisher.send(msg, deliveryMode, priority, ttl);
  				}
  			} catch (Exception cause) {
  				logger.warn("Unable to send message to JMS server!", cause);
  			}
  		}
  	}
docs: --- PUBLISH ---