code: private void doFail(long id) {
      if (log.isDebugEnabled()) {
        log.debug(String.format("%s - Received resend request for messages starting at %d", this, id));
      }
  
      // Ack all the entries before the given ID.
      doAck(id);
  
      // Now that all the entries before the given ID have been removed,
      // just iterate over the messages map and resend all the messages.
      Iterator<Map.Entry<Long, JsonObject>> iter = messages.entrySet().iterator();
      while (iter.hasNext()) {
        eventBus.send(inAddress, iter.next().getValue());
      }
    }
docs: Handles a batch fail.