Code review comment: I think this is completely wonderful. I believe then the code for `completeRequest()` should be:  ```     private void completeRequest(List<RequestEntryT> failedRequestEntries, long requestStartTime) {         // do completeRequest stuff including reducing the inFlightRequestsCount, etc.         mailboxExecutor.tryYield();         nonBlockingFlush();     } ```  We would get all the previously alluded to benefits.  My only question (and maybe worry) would be if we had a very large number of in flight requests that have all completed (say 100+? since it's customisable by user). Once one `completeRequest` is triggered, the `mailboxExecutor.tryYield()` would repeatedly yield to the next completed request in a daisy chain of length equal to the number of completed in flight requests.   I imagine the state of the mailbox thread would have to live alongside the others' states during that time and I was wondering would that risk us using more stack/heap than otherwise and thereby risking an overflow?

Code under review:
private void flush() {
        while (inFlightRequestsCount >= maxInFlightRequests) {
            try {
                mailboxExecutor.yield();
            } catch (InterruptedException e) {
                getFatalExceptionCons()
                        .accept(
                                new InterruptedException(
                                        "The mailbox thread was interrupted while waiting for asynchronous write operations to complete."));
            }
        }

        List<RequestEntryT> batch = createNextAvailableBatch();

        if (batch.size() == 0) {
            return;
        }

        long timestampOfRequest = System.currentTimeMillis();
        Consumer<List<RequestEntryT>> requestResult =
                failedRequestEntries ->
                        mailboxExecutor.execute(
                                () -> completeRequest(failedRequestEntries, timestampOfRequest),
                                "Mark in-flight request as completed and requeue %d request entries",
                                failedRequestEntries.size());

        inFlightRequestsCount++;
        submitRequestEntries(batch, requestResult);
    }

Line commented on: failedRequestEntries ->

Revised code:
private void flush() throws InterruptedException {
        while (isInFlightRequestOrMessageLimitExceeded()) {
            mailboxExecutor.yield();
        }

        List<RequestEntryT> batch = createNextAvailableBatch();
        int batchSize = batch.size();

        if (batch.size() == 0) {
            return;
        }

        long timestampOfRequest = System.currentTimeMillis();
        Consumer<List<RequestEntryT>> requestResult =
                failedRequestEntries ->
                        mailboxExecutor.execute(
                                () ->
                                        completeRequest(
                                                failedRequestEntries,
                                                batchSize,
                                                timestampOfRequest),
                                "Mark in-flight request as completed and requeue %d request entries",
                                failedRequestEntries.size());

        inFlightRequestsCount++;
        inFlightMessages += batchSize;
        submitRequestEntries(batch, requestResult);
    }