int i = targetTopics.length; while (--i>=0) { targetTopics[i] = cmd.newPubSubService(internalTopicsSub[i].toString()); conFeedbackService = cmd.newPubSubService(connectionFeedbackTopic.toString());
public JoinBlockingBehavior(MsgRuntime<?,?,?> msgRuntime, Pipe<RawDataSchema>[] inputPipes, String[] targetTopics, TargetSelector selector) { this.inputPipes = inputPipes; this.selector = selector; PipeConfigManager pcm = new PipeConfigManager(4, MsgRuntime.defaultCommandChannelLength, MsgRuntime.defaultCommandChannelMaxPayload); BuilderImpl builder = MsgRuntime.builder(msgRuntime); int dataLen = PronghornStage.maxVarLength(inputPipes); int count = inputPipes[0].config().minimumFragmentsOnPipe(); //build each of the target publish services so they can be indexed by targetTopics position targetService = new PubSubFixedTopicService[targetTopics.length]; int i = targetTopics.length; while (--i>=0) { targetService[i] = builder.newCommandChannel(msgRuntime.constructingParallelInstance(), pcm) .newPubSubService(targetTopics[i], count, dataLen); } }