[ https://issues.apache.org/jira/browse/KAFKA-12879?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17485498#comment-17485498 ]
Colin McCabe commented on KAFKA-12879: -------------------------------------- bq. My suggestion is to do 3 and to make sure the cause of `TimeoutException` is `UnknownTopicOrPartitionException`. Since 2.5.2 and newer have the updated behavior, it's now more disruptive to change it back. I think this is still quite harmful for people who want to build tools to poll partition offsets. It's really a very disruptive behavior to time out, which could take several minutes and many retries. I almost would suggest adding an option for this... but I just think the retry behavior is wrong and not consistent with how most admin operations work. > Compatibility break in Admin.listOffsets() > ------------------------------------------ > > Key: KAFKA-12879 > URL: https://issues.apache.org/jira/browse/KAFKA-12879 > Project: Kafka > Issue Type: Bug > Components: admin > Affects Versions: 2.8.0, 2.7.1, 2.6.2 > Reporter: Tom Bentley > Assignee: Kirk True > Priority: Major > > KAFKA-12339 incompatibly changed the semantics of Admin.listOffsets(). > Previously it would fail with {{UnknownTopicOrPartitionException}} when a > topic didn't exist. Now it will (eventually) fail with {{TimeoutException}}. > It seems this was more or less intentional, even though it would break code > which was expecting and handling the {{UnknownTopicOrPartitionException}}. A > workaround is to use {{retries=1}} and inspect the cause of the > {{TimeoutException}}, but this isn't really suitable for cases where the same > Admin client instance is being used for other calls where retries is > desirable. > Furthermore as well as the intended effect on {{listOffsets()}} it seems that > the change could actually affect other methods of Admin. > More generally, the Admin client API is vague about which exceptions can > propagate from which methods. This means that it's not possible to say, in > cases like this, whether the calling code _should_ have been relying on the > {{UnknownTopicOrPartitionException}} or not. -- This message was sent by Atlassian Jira (v8.20.1#820001)