@Override
    public void close(Duration timeout) {
        delegate.close(timeout);
    }
Tries to close the consumer cleanly within the specified timeout. This method waits up to
{@code timeout} for the consumer to complete acknowledgements and leave the group.
If the consumer is unable to complete acknowledgements and gracefully leave the group
before the timeout expires, the consumer is force closed. Note that {@link #wakeup()} cannot be
used to interrupt close.

@param timeout The maximum time to wait for consumer to close gracefully. The value must be
               non-negative. Specifying a timeout of zero means do not wait for pending requests to complete.

@throws IllegalArgumentException if the {@code timeout} is negative
@throws WakeupException if {@link #wakeup()} is called before or while this method is called
@throws InterruptException if the thread is interrupted before or while this method is called
@throws KafkaException for any other error during close
clients/src/main/java/org/apache/kafka/clients/consumer/KafkaShareConsumer.java