Found somewhat related ticket https://issues.apache.org/ jira/browse/KAFKA-4385
On Fri, Jan 27, 2017 at 1:09 PM, Stevo Slavić <ssla...@gmail.com> wrote: > Hello Apache Kafka community, > > When using new async KafkaProducer, one can register callback with send > calls. > > With auto.create.topics.enable set to false, when I try to publish to non > existing topic, I expect callback to complete with > UnknownTopicOrPartitionException. Instead, I get back > "org.apache.kafka.common.errors.TimeoutException: Failed to update > metadata after..." > > When topic doesn't truly exist (so metadata request reached broker and > response included error that topic is unknown) I would like to handle that > case differently, than when there are e.g. networking problems like when > metadata response was not received on time and timeout exception is > appropriate. > > I've reproduced this unwanted behavior with both Kafka 0.9.0.1 and 0.10.1.1 > > Is this a feature or a bug? If feature, would it make sense to improve it > in this case to throw UnknownTopicOrPartitionException instead? > > Kind regards, > Stevo Slavic. >