public void wakeup() {
        // The network client can be null if the initializeResources method has not yet been called.
        if (networkClientDelegate != null)
            networkClientDelegate.wakeup();
    }
Performs any network I/O that is needed at the time of close for the consumer:

<ol>
    <li>
        Iterate through the {@link RequestManager} list and invoke {@link RequestManager#pollOnClose()}
        to get the {@link NetworkClientDelegate.UnsentRequest} list and the poll time for the network poll
    </li>
    <li>
        Stage each {@link AbstractRequest.Builder request} to be sent via
        {@link NetworkClientDelegate#addAll(List)}
    </li>
    <li>
        {@link KafkaClient#poll(long, long) Poll the client} to send the requests, as well as
        retrieve any available responses
    </li>
    <li>
        Continuously {@link KafkaClient#poll(long, long) poll the client} as long as the
        {@link Timer#notExpired() timer hasn't expired} to retrieve the responses
    </li>
</ol>
clients/src/main/java/org/apache/kafka/clients/consumer/internals/ConsumerNetworkThread.java