use of org.apache.storm.eventhubs.bolt.EventHubBoltConfig in project storm by apache.
the class EventHubLoop method buildTopology.
@Override
protected StormTopology buildTopology(EventHubSpout eventHubSpout) {
TopologyBuilder topologyBuilder = new TopologyBuilder();
topologyBuilder.setSpout("EventHubsSpout", eventHubSpout, spoutConfig.getPartitionCount()).setNumTasks(spoutConfig.getPartitionCount());
EventHubBoltConfig boltConfig = new EventHubBoltConfig(spoutConfig.getConnectionString(), spoutConfig.getEntityPath(), true);
EventHubBolt eventHubBolt = new EventHubBolt(boltConfig);
int boltTasks = spoutConfig.getPartitionCount();
topologyBuilder.setBolt("EventHubsBolt", eventHubBolt, boltTasks).localOrShuffleGrouping("EventHubsSpout").setNumTasks(boltTasks);
return topologyBuilder.createTopology();
}
Aggregations