code: def publish(self, topic, data, defer=None):
          
          nsq.assert_valid_topic_name(topic)
          fields = {'topic': topic}
  
          if defer is not None:
              fields['defer'] = '{}'.format(defer)
  
          return self._request('POST', '/pub', fields=fields, body=data)
docs: Publish a message to the given topic over http.
  
          :param topic: the topic to publish to
  
          :param data: bytestring data to publish
  
          :param defer: duration in millisconds to defer before publishing
              (requires nsq 0.3.6)