code: function reqeueBatch(times,interval,batch) {
      async.retry({times: times, interval: interval}, function(cb) {
        syncBatch(batch,cb);
      }, function done(err) {
        if (err) {
          log.error("failed to sync message batch", {err: err, data: batch});
        }
      });
    }
docs: requeue the send of messages on failure. stopping after times or first success