Search in sources :

Example 1 with KafkaSpoutTestBolt

use of org.apache.storm.kafka.spout.test.KafkaSpoutTestBolt in project storm by apache.

the class SingleTopicKafkaSpoutConfiguration method getTopologyKafkaSpout.

public static StormTopology getTopologyKafkaSpout(int port) {
    final TopologyBuilder tp = new TopologyBuilder();
    tp.setSpout("kafka_spout", new KafkaSpout<>(getKafkaSpoutConfig(port)), 1);
    tp.setBolt("kafka_bolt", new KafkaSpoutTestBolt()).shuffleGrouping("kafka_spout", STREAM);
    return tp.createTopology();
}
Also used : TopologyBuilder(org.apache.storm.topology.TopologyBuilder) KafkaSpoutTestBolt(org.apache.storm.kafka.spout.test.KafkaSpoutTestBolt)

Aggregations

KafkaSpoutTestBolt (org.apache.storm.kafka.spout.test.KafkaSpoutTestBolt)1 TopologyBuilder (org.apache.storm.topology.TopologyBuilder)1