Luis Ashurei created KAFKA-10620:
------------------------------------

             Summary: Ensure Topic Metadata loaded just after create 
KafkaProducer
                 Key: KAFKA-10620
                 URL: https://issues.apache.org/jira/browse/KAFKA-10620
             Project: Kafka
          Issue Type: Improvement
          Components: clients, producer 
    Affects Versions: 2.1.1
            Reporter: Luis Ashurei


Seems _KafkaProducer_ neither expose API nor config properties to actively init 
(or wait for) topic Metadata, which will lead to send message failed at the 
beginning if use short `_max.block.ms_`.
{code:java}
TimeoutException...
Topic XXX not present in metadata after XXX ms.{code}
I reproduced the issue in kafka-clients-2.1.1.jar, and check the latest version 
doc nothing changed related.

_Thread.sleep_ can be a temporary work around, just wonder any better solutions.

Thanks!



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to