code: @Override
  	public void publish(String channel, Tree message) {
  		if (client != null) {
  			try {
  				int pos = channel.indexOf('.');
  				if (channel.indexOf('.', pos + 1) > -1) {
  
  					// Send to queue directly
  					if (debug && (debugHeartbeats || !channel.endsWith(heartbeatChannel))) {
  						logger.info("Submitting message to queue \"" + channel + "\":\r\n" + message.toString());
  					}
  					this.channel.basicPublish("", channel, mandatory, immediate, messageProperties,
  							serializer.write(message));
  
  				} else {
  
  					// Send to exchange
  					if (debug && (debugHeartbeats || !channel.endsWith(heartbeatChannel))) {
  						logger.info("Submitting message to exchange \"" + channel + "\":\r\n" + message.toString());
  					}
  					this.channel.basicPublish(channel, "", mandatory, immediate, messageProperties,
  							serializer.write(message));
  
  				}
  			} catch (Exception cause) {
  				logger.warn("Unable to send message to AMQP server!", cause);
  			}
  		}
  	}
docs: --- PUBLISH ---