use of org.openkilda.wfm.topology.flowhs.bolts.FlowSwapEndpointsHubBolt in project open-kilda by telstra.
the class FlowHsTopology method flowSwapEndpointsHub.
private void flowSwapEndpointsHub(TopologyBuilder topologyBuilder, PersistenceManager persistenceManager) {
int hubTimeout = (int) TimeUnit.SECONDS.toMillis(topologyConfig.getSwapEndpointsHubTimeoutSeconds());
HubBolt.Config config = HubBolt.Config.builder().requestSenderComponent(ComponentId.FLOW_ROUTER_BOLT.name()).workerComponent(ComponentId.FLOW_UPDATE_HUB.name()).timeoutMs(hubTimeout).lifeCycleEventComponent(ZooKeeperSpout.SPOUT_ID).build();
FlowSwapEndpointsHubBolt hubBolt = new FlowSwapEndpointsHubBolt(config, persistenceManager);
declareBolt(topologyBuilder, hubBolt, ComponentId.FLOW_SWAP_ENDPOINTS_HUB.name()).fieldsGrouping(ComponentId.FLOW_ROUTER_BOLT.name(), ROUTER_TO_FLOW_SWAP_ENDPOINTS_HUB.name(), FIELDS_KEY).fieldsGrouping(ComponentId.FLOW_UPDATE_HUB.name(), UPDATE_HUB_TO_SWAP_ENDPOINTS_HUB.name(), FIELDS_KEY).allGrouping(ZooKeeperSpout.SPOUT_ID).directGrouping(CoordinatorBolt.ID);
}
Aggregations