I am using WSO2 Clone mediator to make calls to 8 endpoints and each call takes around 10 seconds so in total it takes around 80 seconds to aggregate the results. My question is, how does the Clone mediator work? Shouldn't it process the calls in parallel and finish the mediation in 10 seconds? I am asking this because in the Clone mediator there is also the option for Sequential Mediation which made me think the default mediation method is parallel.
Usage of Clone mediator.
The Clone Mediator can be used to clone a message into several messages. It resembles the Scatter-Gather enterprise integration pattern. The Clone mediator is similar to the Iterate mediator. The difference between the two mediators is that the Iterate mediator splits a message into different parts, whereas the Clone mediator makes multiple identical copies of the message. If you set the parameter
Sequential="false"in the clone mediaor each clone should be processed in parallel.