You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Michael Edgar (Jira)" <ji...@apache.org> on 2023/10/20 18:55:00 UTC

[jira] [Updated] (KAFKA-15373) AdminClient#describeTopics should not throw InvalidTopicException if topic ID is not found

     [ https://issues.apache.org/jira/browse/KAFKA-15373?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael Edgar updated KAFKA-15373:
----------------------------------
    External issue URL: https://github.com/apache/kafka/pull/14599

> AdminClient#describeTopics should not throw InvalidTopicException if topic ID is not found
> ------------------------------------------------------------------------------------------
>
>                 Key: KAFKA-15373
>                 URL: https://issues.apache.org/jira/browse/KAFKA-15373
>             Project: Kafka
>          Issue Type: Bug
>    Affects Versions: 3.5.1
>            Reporter: Michael Edgar
>            Priority: Major
>
> Similar to KAFKA-7808.
> In {{KafkaAdminClient#handleDescribeTopicsByIds}}, when the topic is not found by ID, an {{InvalidTopicException}} is thrown.
> {code:java}
> String topicName = cluster.topicName(topicId);
> if (topicName == null) {
>     future.completeExceptionally(new InvalidTopicException("TopicId " + topicId + " not found."));
>     continue;
> }
> {code}
> It would be better to use an {{UnknownTopicIdException}} in this case, which better aligns to the use of {{UnknownTopicOrPartitionException}} for the same scenario when describing topics by name.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)