private void maybeFindCoordinatorAndRetry(TransactionManager.TxnRequestHandler nextRequestHandler) {
        if (nextRequestHandler.needsCoordinator()) {
            transactionManager.lookupCoordinator(nextRequestHandler);
        } else {
            // For non-coordinator requests, sleep here to prevent a tight loop when no node is available
            time.sleep(retryBackoffMs);
            metadata.requestUpdate(false);
        }

        transactionManager.retry(nextRequestHandler);
    }
Returns true if a transactional request is sent or polled, or if a FindCoordinator request is enqueued
clients/src/main/java/org/apache/kafka/clients/producer/internals/Sender.java