I've found the aggregator quickstart which has a splitter service included. However, I don't really understand it.
<action class="org.jboss.soa.esb.actions.StaticRouter" name="StaticRouter"> <property name="destinations"> <!-- process="split" is the trick --> <route-to destination-name="red" service-category="RedTeam" service-name="GoRed" /> <route-to destination-name="blue" service-category="BlueTeam" service-name="GoBlue" /> <route-to destination-name="green" service-category="GreenTeam" service-name="GoGreen" /> </property> </action>
Where is this process="split" trick used?
Well, after some more thinking I think that I need an action which evaluates an xpath expression and packs each of the results in a ESB message which can then be processed in a second service with Smooks. I guess there are no classes which do just that, but it should be fairly simple to implement by myself.
Any router with multiple destinations will split the message. It's not really a trick anymore ;)
How does the router split the message? How does it know where to split the message?
The parameters for the router only seem to indicate where to send the message but not how to split it.
I'm currently using smooks for splitting and routing but I how would I do that with a static router for example?
Well, I get to answer my question too. :)
Message splitting by the router does not really mean "message splitting" but rather "process flow splitting". A static router with multiple destinations will send the same message to multiple services at the same time for parallel processing.
Sorry for not catching this one earlier.
You are totally correct.. the Splitter Router doesn't actually split the message into smaller messages. You need to use the Smooks stuff for this. I assume you've seen the huge, split, transform and route quickstart??