frankvicky commented on code in PR #21080:
URL: https://github.com/apache/kafka/pull/21080#discussion_r3628673895
##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/AsyncKafkaConsumer.java:
##########
@@ -2204,6 +2201,13 @@ private void acquireAndEnsureOpen() {
release();
throw new IllegalStateException("This consumer has already been
closed.");
}
+
+ try {
+ metadata.maybeThrowBootstrapFatalException();
Review Comment:
Fair point — kept it.
Originally left off because for the classic consumer any network-hitting
call already surfaces the failure via `metadata.awaitUpdate` →
`maybeThrowFatalException` (which checks `bootstrapFatalException`), so
`testConsumerBootstrapResolutionExceptionPropagatedToPoll` passes for both
`CLASSIC` and `CONSUMER`. But
(1) it aligns Classic / Async / Share, and
(2) it also covers pure-local APIs (`subscribe`, `unsubscribe`, `assign`,
`wakeup`, query methods) that never poll, so the caller sees the error
immediately.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]