cadonna commented on code in PR #14872:
URL: https://github.com/apache/kafka/pull/14872#discussion_r1410550926


##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/AsyncKafkaConsumer.java:
##########
@@ -1370,7 +1395,11 @@ public KafkaConsumerMetrics kafkaConsumerMetrics() {
     private void maybeThrowFencedInstanceException() {
         if (isFenced) {
             throw new FencedInstanceIdException("Get fenced exception for 
group.instance.id " +
-                groupInstanceId.orElse("null"));
+                groupMetadata.orElseThrow(
+                    () -> new IllegalStateException("No group metadata found 
although a group ID was provided. This is a bug!")

Review Comment:
   I think the most important thing is that the  `FencedInstanceIdException` is 
thrown. I changed it to just log errors before `FencedInstanceIdException` is 
thrown.



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