code: func (conn *Connection) Publish(msg *Message) error {
  	transport, err := msg.Transport()
  	if err != nil {
  		return fmt.Errorf("Cannot publish Message %s: %s", msg.RequestID, err)
  	}
  
  	transport.RecordNetworkHop(conn.ConnectedServer(), conn.choria.Config.Identity, conn.ConnectedServer())
  
  	if msg.CustomTarget != "" {
  		return conn.publishConnectedBroadcast(msg, transport)
  	}
  
  	if conn.choria.IsFederated() {
  		return conn.publishFederated(msg, transport)
  	}
  
  	return conn.publishConnected(msg, transport)
  }
docs: // Publish inspects a Message and publish it according to its Type