cadonna commented on code in PR #14879: URL: https://github.com/apache/kafka/pull/14879#discussion_r1413661084
########## clients/src/main/java/org/apache/kafka/clients/consumer/internals/AsyncKafkaConsumer.java: ########## @@ -398,6 +466,38 @@ public class AsyncKafkaConsumer<K, V> implements ConsumerDelegate<K, V> { requestManagersSupplier); } + private Optional<ConsumerGroupMetadata> initializeGroupMetadata(final ConsumerConfig config, + final GroupRebalanceConfig groupRebalanceConfig) { + final Optional<ConsumerGroupMetadata> groupMetadata = initializeGroupMetadata( + groupRebalanceConfig.groupId, + groupRebalanceConfig.groupInstanceId + ); + if (!groupMetadata.isPresent()) { + config.ignore(ConsumerConfig.AUTO_COMMIT_INTERVAL_MS_CONFIG); + config.ignore(THROW_ON_FETCH_STABLE_OFFSET_UNSUPPORTED); + } + return groupMetadata; + } + + private Optional<ConsumerGroupMetadata> initializeGroupMetadata(final String groupId, + final Optional<String> groupInstanceId) { + if (groupId != null) { + if (groupId.isEmpty()) { + throwInInvalidGroupIdException(); Review Comment: Yes, but I changed also the code to get rid of that line. -- 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