I have basic question in Spring integration. I tried searching in other threads but was not satisfied with the answers. So here are my questions. Any tip will be highly appreciated.
I am trying to get data from 4 different sources in parallel and aggregate the data.
My understanding (as per one of the threads I read earlier) is, any output channel of a splitter if is a Direct Channel, then the request is routed sequentially.
But output channel of the Splitter is a recepient-list router. When I debugged the request was being routed sequentially. So upon some analysis, I found we can use payload type router to process in parallel.
So I changed the router to payload type router and still the request is being routed sequentially.
So I changed my strategy and used a Publish-subscriber Channel and connected the output of all the subscribing channels to an aggregator so that I can aggregate the results. I was able to source the data in parallel but I do not see the response being routed to aggregated. Am I doing it wrong? Please suggest!
<int:publish-subscribe-channel id="PublishSubscriberChannel"
task-executor="taskExecutor" />
<task:executor id="taskExecutor" pool-size="5" />
<int:service-activator input-channel="PublishSubscriberChannel"
ref="lookUpService" method="lookupSource1" output-channel="lookupAggregatorChannel" />
<int:service-activator input-channel="PublishSubscriberChannel"
ref="lookUpService" method="lookupSource2" output-channel="lookupAggregatorChannel" />
<int:service-activator input-channel="PublishSubscriberChannel"
ref="lookUpService" method="getVehicleInfoWithAdditionalAttributes"
output-channel="lookupAggregatorChannel" />
<int:service-activator input-channel="PublishSubscriberChannel"
ref="lookUpService" method="lookupSource4" output-channel="lookupAggregatorChannel" />