cadonna commented on code in PR #15491: URL: https://github.com/apache/kafka/pull/15491#discussion_r1516359058
########## clients/src/main/java/org/apache/kafka/clients/consumer/internals/SubscriptionState.java: ########## @@ -540,6 +540,14 @@ public synchronized FetchPosition position(TopicPartition tp) { return assignedState(tp).position; } + public synchronized FetchPosition positionOrNull(TopicPartition tp) { Review Comment: In all new methods, I try to avoid the `IllegalStateException` by verifying whether the partition is assigned or not. In most methods the return value signals to the caller if the partition is unassigned. -- 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