title: Apache Kafka: How to find out consumer group of a topic?
body: <p>I am working on Kafka with Spark streaming in Scala. There are multiple topics from which I need to fetch messages. For that, I need to input consumer group of each topic. </p>
  
  <p>I have tried following command:</p>
  
  <pre><code>bin/kafka-consumer-groups.sh --zookeeper localhost:2181 --describe --group group_name
  </code></pre>
  
  <p>For this, I need to mention consumer group and check whether my topic falls under this group. But I don't know the consumer group value for some topics.</p>
  
  <p>So, <strong>is there any command or programmatic way</strong> of finding consumer group for a given topic?</p>
  
  <p>Any help on this would be greatly appreciated.
  Thank you</p>