title: How can i get list of topics from kafka server using kafka-node library?
body: <p>I wanted to create new topic on kafka server but before that i want to retrieve topic list from my server , How can i achieve that once connection is established ?</p>
  
  <p>main.js</p>
  
  <pre><code>  var groupId = 'test1';
      var clientId = "consumer-" + Math.floor(Math.random() * 10000);
      var options = {autoCommit: true, fetchMaxWaitMs: 100, fetchMaxBytes: 10 * 1024 * 1024, groupId: groupId};
      console.log("Started consumer: ", clientId);
      var consumer_client = new Client(kafkaConn,clientId);
      var client = new Client(consumer_client.connectionString,clientId);
      var consumer = new HighLevelConsumer(client, topics, options);
  </code></pre>