tree: ca666020991d8df2003d3f30b68efa79238e27d7 [path history] [tgz]
  3. pom.xml
  4. src/

Storm Kafka

Provides core storm and Trident spout implementations for consuming data from Apache Kafka 0.8.x.

Usage Example

TridentTopology topology = new TridentTopology();
BrokerHosts zk = new ZkHosts("localhost");
TridentKafkaConfig spoutConf = new TridentKafkaConfig(zk, "test-topic");
spoutConf.scheme = new SchemeAsMultiScheme(new StringScheme());
OpaqueTridentKafkaSpout spout = new OpaqueTridentKafkaSpout(spoutConf);

Using storm-kafka with different versions of Scala

Storm-kafka's Kafka dependency is defined as provided scope in maven, meaning it will not be pulled in as a transitive dependency. This allows you to use a version of Kafka built against a specific Scala version.

When building a project with storm-kafka, you must explicitly add the Kafka dependency. For example, to use Kafka built against Scala 2.10, you would use the following dependency in your pom.xml:


Note that the ZooKeeper and log4j dependencies are excluded to prevent version conflicts with Storm's dependencies.

Committer Sponsors