java - Spring intgeration - recipientlistrouter - parallel processing -
how can achieve parallel processing in spring-integration recipient-list-router.
my goal router has content based , sending messages various channel on parallel processing multicast. tried multicast in camel camel-spring-integration couldn't configure content based
please if cane done
thanks
i have achieved similar sort of requirements extending spring-integrations's recipientlistrouter follows:
public class cententbasedrecipientlistrouter extends recipientlistrouter { @override protected void handlemessageinternal(final message<?> message) { ...... } }
in overridden method, can implement customized content based routing logic per requirements.
this custom router can configured follows:
<bean id="customrecipientlistrouter" class="cententbasedrecipientlistrouter"> <property name="channels"> <list> <ref bean="parallelprocessingchannel1"/> <ref bean="parallelprocessingchannel2"/> <ref bean="parallelprocessingchannel3"/> </list> </property> </bean> <int:router ref="customrecipientlistrouter" input-channel="routingchannel" default-output-channel="errorchannel" />
in order achieve parallel processing, can have task executor channels follows:
<int:channel id="parallelprocessingchannel1"> <int:dispatcher task-executor="threadpoolexecutor"/> </int:channel>
Comments
Post a Comment