title: How to create a Topic in Kafka through Java
body: <p>I want to create a topic in Kafka (kafka_2.8.0-0.8.1.1) through java. It is working fine if I create a topic in command prompt, and If I push message through java api. But I want to create a topic through java api. After a long search I found below code,</p>
  
  <pre><code>ZkClient zkClient = new ZkClient("localhost:2181", 10000, 10000);
  AdminUtils.createTopic(zkClient, myTopic, 10, 1, new Properties());
  </code></pre>
  
  <p>I tried above code and it is showing that topic is created but I am not able to push message in the topic. Any thing wrong in my code? Or any other way to achieve the above? </p>