storm kafka集成
Spoutconfig is an extension of KafkaConfig that supports additional fields with ZooKeeper connection info and for controlling behavior specific to KafkaSpout. The Zkroot will be used as root to store your consumer's offset. The id should uniquely identify your spout.
SpoutConfig spoutConfig=new SpoutConfig(BrokerHosts hosts, String topic, String zkRoot, String id));
hosts:指明zookeeper cluster的地址
topic:指明消费kafka topic 名称
zkroot参数:指明存储consumer offset的目录位置
id:用来唯一的标识spout

浙公网安备 33010602011771号