Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-7808

AdminClient#describeTopics should not throw InvalidTopicException if topic name is not found

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 2.2.0
    • admin, core
    • None

    Description

      In AdminClient#describeTopics, we have the following logic:

              if (!cluster.topics().contains(topicName)) {
                              future.completeExceptionally(new InvalidTopicException("Topic " + topicName + " not found."));
                              continue;
                          }
      

      However, InvalidTopicException is a non-retriable exception and is used to indicate that topic contains invalid chars or topic name is too long etc, and hence not correct to use. We should, instead, throw the retriable UnknownTopicOrPartitionException instead.

      We should make sure any callers on this logic should be cleaned up when fixing it.

      Attachments

        Issue Links

          Activity

            People

              dongjin Dongjin Lee
              guozhang Guozhang Wang
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: