count batches submitted and wait for batch ack before putting end on failureQueue.