Hi, kafka is a partitioned system, so not all the servers have the complete data set.
The producer does not know whether the topic is not exist, or some brokers are down, it just tries to query again and again until timeout occurs. I think org.apache.kafka.common.errors.TimeoutException makes sense. Correct me if I am wrong. Best. On Sun, Sep 20, 2015 at 6:33 AM, Richard Lee <rd...@tivo.com> wrote: > Hi there- > > The error message returned when trying to produce to a nonexistent kafka > topic (with auto topic creation disabled) is non obvious. It returns an > error message of the form: > > "org.apache.kafka.common.errors.TimeoutException: Failed to update > metadata after xx ms" > > where xx is a small number, like 50. > > This looks like a communication error of some sort, except for the very > short timeout. I went off into the weeds thinking that my kafka brokers > were down or that there was a network routing problem or something until I > finally figured out that the topic simply was not there. Creating the > topic made this error go away and things started working. > > A more explicit exception like > > “org.apache.kafka.common.errors.NoSuchTopic: Unable to find topic > ‘missing-topic-name-here’” > > would be much more straightforward. > > Richard > >