code: @Override
  	public void publish(String channel, Tree message) {
  		if (connected.get()) {
  			try {
  				if (debug && (debugHeartbeats || !channel.endsWith(heartbeatChannel))) {
  					logger.info("Submitting message to channel \"" + channel + "\":\r\n" + message.toString());
  				}
  				byte[] bytes = serializer.write(message);
  				PubsubMessage msg = PubsubMessage.newBuilder().setData(ByteString.copyFrom(bytes)).build();
  				getOrCreatePublisher(channel).publish(msg);
  			} catch (Exception cause) {
  				logger.warn("Unable to send message to Google Cloud service!", cause);
  			}
  		}
  	}
docs: --- PUBLISH ---