use of org.openkilda.wfm.topology.flowhs.bolts.YFlowDeleteHubBolt in project open-kilda by telstra.
the class FlowHsTopology method yFlowDeleteHub.
private void yFlowDeleteHub(TopologyBuilder topologyBuilder, PersistenceManager persistenceManager) {
int hubTimeout = (int) TimeUnit.SECONDS.toMillis(topologyConfig.getDeleteHubTimeoutSeconds());
YFlowDeleteConfig config = YFlowDeleteConfig.builder().speakerCommandRetriesLimit(topologyConfig.getYFlowDeleteSpeakerCommandRetriesLimit()).autoAck(true).timeoutMs(hubTimeout).requestSenderComponent(ComponentId.FLOW_ROUTER_BOLT.name()).workerComponent(ComponentId.YFLOW_DELETE_SPEAKER_WORKER.name()).lifeCycleEventComponent(ZooKeeperSpout.SPOUT_ID).build();
FlowResourcesConfig flowResourcesConfig = configurationProvider.getConfiguration(FlowResourcesConfig.class);
RuleManagerConfig ruleManagerConfig = configurationProvider.getConfiguration(RuleManagerConfig.class);
YFlowDeleteHubBolt hubBolt = new YFlowDeleteHubBolt(config, persistenceManager, flowResourcesConfig, ruleManagerConfig);
declareBolt(topologyBuilder, hubBolt, ComponentId.YFLOW_DELETE_HUB.name()).fieldsGrouping(ComponentId.FLOW_ROUTER_BOLT.name(), Stream.ROUTER_TO_YFLOW_DELETE_HUB.name(), FLOW_FIELD).directGrouping(ComponentId.YFLOW_DELETE_SPEAKER_WORKER.name(), Stream.SPEAKER_WORKER_TO_HUB_YFLOW_DELETE.name()).allGrouping(ZooKeeperSpout.SPOUT_ID).directGrouping(CoordinatorBolt.ID);
}
Aggregations