kafka-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ajay Sharma <asha...@arenasolutions.com>
Subject Re: How to create a topic using the Java API / Client?
Date Wed, 14 Sep 2016 22:00:37 GMT
You can make following setting to set partition count, etc

auto.create.topics.enable = true 		(enable auto creation of topic on the server)
num.partitions = 1 			(number of log partitions per topic)


On 9/14/16, 2:41 PM, "Ali Akhtar" <ali.rac200@gmail.com> wrote:

    It looks like if I just send a message to a non-existent topic, it is
    created. But this has the downside that the first message of the topic is
    null or otherwise invalid.
    
    Also the partition count can't be specified.
    
    Is there a way to create a topic without needing to post a null message? Do
    I need to talk to the bash script?
    
    On Wed, Sep 14, 2016 at 8:45 AM, Ali Akhtar <ali.rac200@gmail.com> wrote:
    
    > Using version 0.10.0.1, how can I create kafka topics using the java
    > client / API?
    >
    > Stackoverflow answers describe using kafka.admin.AdminUtils, but this
    > class is not included in the kafka-clients maven dependency. I also don't
    > see the package kafka.admin in the javadocs: http://kafka.apache.
    > org/0100/javadoc/index.html?org/apache/kafka/clients/produce
    > r/KafkaProducer.html
    >
    >
    > What am I missing?
    >
    >
    

Mime
View raw message