FrankYang0529 commented on code in PR #16449: URL: https://github.com/apache/kafka/pull/16449#discussion_r1666855070
########## clients/src/main/java/org/apache/kafka/clients/consumer/internals/AsyncKafkaConsumer.java: ########## @@ -1490,6 +1490,8 @@ public void unsubscribe() { log.error("Failed while waiting for the unsubscribe event to complete"); } resetGroupMetadata(); + } else { Review Comment: Hi @chia7712 and @lianetm, it looks like we can't use `UnsubscribeEvent` when group id is empty, because `heartbeatRequestManager` will be empty. The test case `PlaintextConsumerTest#testConsumingWithNullGroupId` can't pass. https://github.com/apache/kafka/blob/9a7eee60727dc73f09075e971ea35909d2245f19/clients/src/main/java/org/apache/kafka/clients/consumer/internals/events/ApplicationEventProcessor.java#L215-L220 https://github.com/apache/kafka/blob/9a7eee60727dc73f09075e971ea35909d2245f19/clients/src/main/java/org/apache/kafka/clients/consumer/internals/RequestManagers.java#L161-L208 -- 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