FrankYang0529 commented on code in PR #17244:
URL: https://github.com/apache/kafka/pull/17244#discussion_r1779660566


##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/AsyncKafkaConsumer.java:
##########
@@ -1476,7 +1481,10 @@ public void unsubscribe() {
                     subscriptions.assignedPartitions());
 
             try {
-                processBackgroundEvents(unsubscribeEvent.future(), timer);
+                // If users subscribe to an invalid topic name, they will get 
InvalidTopicException in error events,
+                // because network thread keeps trying to send MetadataRequest 
in the background.
+                // Ignore it to avoid unsubscribe failed.
+                processBackgroundEvents(unsubscribeEvent.future(), timer, e -> 
e instanceof InvalidTopicException);

Review Comment:
   Create a followup Jira https://issues.apache.org/jira/browse/KAFKA-17648.



-- 
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

Reply via email to