public class KafkaSpoutTopologyMainNamedTopics extends Object
This example sets up 3 topologies to put data in Kafka via the KafkaBolt, and shows how to set up a topology that reads from some Kafka topics using the KafkaSpout.
Modifier and Type | Field and Description |
---|---|
static String |
TOPIC_0 |
static String |
TOPIC_1 |
static String |
TOPIC_2 |
Constructor and Description |
---|
KafkaSpoutTopologyMainNamedTopics() |
Modifier and Type | Method and Description |
---|---|
protected Config |
getConfig() |
protected KafkaSpoutConfig<String,String> |
getKafkaSpoutConfig(String bootstrapServers) |
protected KafkaSpoutRetryService |
getRetryService() |
protected StormTopology |
getTopologyKafkaSpout(KafkaSpoutConfig<String,String> spoutConfig) |
static void |
main(String[] args) |
protected void |
runMain(String[] args) |
public static final String TOPIC_0
public static final String TOPIC_1
public static final String TOPIC_2
protected Config getConfig()
protected StormTopology getTopologyKafkaSpout(KafkaSpoutConfig<String,String> spoutConfig)
protected KafkaSpoutConfig<String,String> getKafkaSpoutConfig(String bootstrapServers)
protected KafkaSpoutRetryService getRetryService()
Copyright © 2019 The Apache Software Foundation. All rights reserved.