That is a Kafka broker level config/parameter and not part of the producer.


On 9/22/16, 3:09 AM, "UMESH CHAUDHARY" <> wrote:

    Hi Mates,
    I was trying to understand that if auto.create.topics.enable=true then how
    KafkaProducer first creates the topic and sends messages to it.
    What I saw:
    private Future<RecordMetadata> doSend(ProducerRecord<K, V> record, Callback
    method in
    What I failed to get:
    When getting metadata for topic using
                ClusterAndWaitTime clusterAndWaitTime =
    waitOnMetadata(record.topic(), this.maxBlockTimeMs);
    line, I am failed to locate the path where we don't have any metadata for
    the topic i.e. topic doesn't exist and according to
    "auto.create.topics.enable=true" KafkaProducer invokes createTopic before
    sending the record.
    It works flawlessly with clients so it must be coded somewhere. I also saw but unable to locate.
    I am a newbie so please forgive for any stupidity here.

Reply via email to