title: NSQ Re-Queue half Message
body: <p>I have an array of <code>Ids</code> of type <code>int64</code> And this is my Nsq Message that I am trying to publish. </p>
  
  <pre><code>nsqMsg := st{
      Action  :     "insert",
      Ids     :     Ids
      GID     :     Gids
  }
  
  msg, err := json.Marshal(nsqMsg)
  if err != nil {
      log.Println(err)
      return err
  }
  err = nsqProducer.Publish(TOPIC-NAME, msg)
  if err != nil {
      log.Println(err)
      return err
  }
  </code></pre>
  
  <p>While in my consumer I am taking each Id one by one and fetching an info based on my Id from my datastore. </p>
  
  <p>So while fetching there can be a case if my CreateObject method returns an error so I handle that case by requeue the msg (which is giving the error) and so it can be retried.  </p>
  
  <pre><code>for i := 0; i &lt; len(data.Ids); i++ {
  
      Object, err := X.CreateObject(data.Ids[i)
          if err != nil {
              requeueMsgData = append(requeueMsgData, data.Ids[i])
              continue
          }
          DataList = append(DataList, Object)
      }
  
      if len(requeueMsgData) &gt; 0 {
          msg, err := json.Marshal(requeueMsgData)
          if err != nil {
              log.Println(err)
              return err
          }
          message.Body = msg
          message.Requeue(60 * time.Second)
          log.Println("error while creating Object", err)
          return n
  }
  </code></pre>
  
  <p>So, is this the right way of doing this?
  Is their any drawback of this case?
  Is it better to publish it again?</p>