code: func (s *Service) PublishMessage(msg *packet.Message) GenericFuture {
  	s.mutex.Lock()
  	defer s.mutex.Unlock()
  
  	// allocate future
  	f := future.New()
  
  	// queue publish
  	s.commandQueue <- &command{
  		publish: true,
  		future:  f,
  		message: msg,
  	}
  
  	return f
  }
docs: // PublishMessage will send a Publish packet containing the passed message. It will
  // return a PublishFuture that gets completed once the quality of service flow
  // has been completed.