@Override
    public void run() {
        try {
            log.debug("Consumer network thread started");

            // Wait until we're securely in the background network thread to initialize these objects...
            initializeResources();

            while (running) {
                try {
                    runOnce();
                } catch (final Throwable e) {
                    // Swallow the exception and continue
                    log.error("Unexpected error caught in consumer network thread", e);
                }
            }
        } finally {
            cleanup();
        }
    }
Background thread runnable that consumes {@link ApplicationEvent} and produces {@link BackgroundEvent}. It
uses an event loop to consume and produce events, and poll the network client to handle network IO.
clients/src/main/java/org/apache/kafka/clients/consumer/internals/ConsumerNetworkThread.java