Use storm to process the topic data in kafka in real time, and want to view the consumption of the topic
How to implement: Enter the client interface of zookeeper: ./zkCli.sh-----
Check out the catalog:
The code level of this response: ------- Here is the consumer group corresponding to the topic, and its storage path is under zookeeper
String zkRoot = "/stormkafka" ; // equivalent to the consumer group
// String id = "hbase_data2"; String id = "hbase_data6" ; BrokerHosts brokerHosts = new ZkHosts(zks); SpoutConfig spoutConf = new SpoutConfig(brokerHosts, topic, zkRoot, id);
Next, check the corresponding situation in the consumer group directory:
You can see that this is the partition directory of the topic
For this, you can view the consumption of the topic