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

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to