cadonna commented on code in PR #14872:
URL: https://github.com/apache/kafka/pull/14872#discussion_r1410538266
##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/AsyncKafkaConsumer.java:
##########
@@ -672,12 +693,16 @@ public Map<TopicPartition, OffsetAndMetadata>
committed(final Set<TopicPartition
}
private void maybeThrowInvalidGroupIdException() {
- if (!groupId.isPresent() || groupId.get().isEmpty()) {
- throw new InvalidGroupIdException("To use the group management or
offset commit APIs, you must " +
- "provide a valid " + ConsumerConfig.GROUP_ID_CONFIG + " in
the consumer configuration.");
+ if (!groupMetadata.isPresent()) {
+ throwInInvalidGroupIdException();
}
}
+ private void throwInInvalidGroupIdException() {
+ throw new InvalidGroupIdException("To use the group management or
offset commit APIs, you must " +
Review Comment:
I agree. Done.
--
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]