kirktrue commented on code in PR #14406: URL: https://github.com/apache/kafka/pull/14406#discussion_r1334873271
########## clients/src/main/java/org/apache/kafka/clients/consumer/internals/DefaultEventHandler.java: ########## @@ -141,11 +77,25 @@ public <T> T addAndGet(final CompletableApplicationEvent<T> event, final Timer t return event.get(timer); } - public void close() { - try { - backgroundThread.close(); - } catch (final Exception e) { - throw new RuntimeException(e); - } + public void close(final Duration timeout) { + Objects.requireNonNull(timeout, "Duration provided to close must be non-null"); + + closer.close( + () -> { + log.info("Closing the default consumer event handler"); Review Comment: I'll change the log line at the start of the method from `info` to `trace` and leave the log line at the end of the method as `debug`. In so doing, both will match the levels in `KafkaConsumer.close()`. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org