0
votes

Im trying to create a PROCESSOR that take in input one parameter and I want it to produce multiple outputs, in this case two. I have defined it like this with a costum interface

public interface MyProcessor {

    String INPUT = "myInput";

    @Input
    SubscribableChannel myInput();

    @Output("myOutput")
    MessageChannel anOutput();

    @Output
    MessageChannel anotherOutput();
}

and than the application logic like this, just return the input parameter

@SpringBootApplication
@EnableBinding(MyProcessor.class)
public class SpringDataFlowAppApplication {

     Logger logger = LoggerFactory.getLogger(SpringDataFlowAppApplication.class);


    @Autowired
    private MyProcessor processor;

    public static void main(String[] args) {
        SpringApplication.run(SpringDataFlowAppApplication.class, args);
    }

    @StreamListener(MyProcessor.INPUT)
    public void routeValues(String val) {

        processor.anOutput().send(MessageBuilder.withPayload(val).build());
        processor.anotherOutput().send(MessageBuilder.withPayload(val).build());

        logger.debug("SpringDataFlowAppApplication --> "+val);
    }
}

Now the question is, how to connect two other processors in this outputs like in the figure. I want to parallelize some processes (PROC_! and PROC_2). For the deployment Im using SpringCloudDataFlow Console as in the image below enter image description here

Hi, This looks like a duplicate of stackoverflow.com/questions/56854655/…Ilayaperumal Gopinathan
Yes you have right, but graphicaly how to parellelize the stream?Ares91
Currently, SCDF Dashboard doesn't have graphic (via Flo) support for handling mutliple input/outputs. You can still create and deploy streams that represents the multiple input/output flow.Ilayaperumal Gopinathan
Any update on this? We are trying to achieve the same.Narendra Kumar