[esb-issues] [JBoss JIRA] Updated: (JBESB-2805) Splitter EAI Pattern: A router that really split the message and delivery the message parts to different message channels

Ricardo Ferreira (JIRA) jira-events at lists.jboss.org
Mon Aug 31 10:46:23 EDT 2009


     [ https://jira.jboss.org/jira/browse/JBESB-2805?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ricardo Ferreira updated JBESB-2805:
------------------------------------

    Attachment: jboss-esb-splitter-test.zip


This is a simple eclipse based project that uses the Splitter action. For testing porpouses, create a XML file named 'pedidoSeguro.xml' with the following content:

<soapenv:Envelope
   xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
   xmlns:ser="http://redhat.com/jboss/esb/services">
   <soapenv:Header />
   <soapenv:Body>
      <ser:somar>
         <a>15</a>
         <b>35</b>
      </ser:somar>
   </soapenv:Body>
</soapenv:Envelope>

When this message arrives in the bus, the splitter action will create two different messages. One message will be created based on the smooks transformation that uses XSLT to remove the namespaces of the XML. The other message will be a instantied pojo the uses the values on the XML.

The first message will be routed to the FirstService, and the second message will be routed to the SecondService. Those services just print the contents of the message (SystemPrintln action) and print the messageID of those messages, using a custom action of the example.

When you see the messageID of the generated message, you see that it uses the messageID of the original message with a sufix "part_1, part_2" on it. This is useful to create a Aggregator pattern that takes the splitted messages and recreate the orginal message again for delivery.

Regards

> Splitter EAI Pattern: A router that really split the message and delivery the message parts to different message channels
> -------------------------------------------------------------------------------------------------------------------------
>
>                 Key: JBESB-2805
>                 URL: https://jira.jboss.org/jira/browse/JBESB-2805
>             Project: JBoss ESB
>          Issue Type: Feature Request
>      Security Level: Public(Everyone can see) 
>          Components: Content Based Routing
>    Affects Versions: 4.4, 4.5, 4.6
>            Reporter: Ricardo Ferreira
>         Attachments: jboss-esb-splitter-test.zip, Splitter.java
>
>
> Current JBoss ESB Routers (StaticRouter and StaticWiretap) does not implement fully the EAI Patterns Splitter (http://www.eaipatterns.com/Sequencer.html). Those implementations just take the incoming message and redelivery for diferent services using basic routing. But in the pattern description we found:
> "Use a Splitter to BREAK OUT the composite message into a series of INDIVIDUAL MESSAGES, each containing data related to one item"
> The proposal is to implement a generic Splitter (org.jboss.soa.esb.actions.Splitter) that takes a message, and, using Smooks, separate the message onto diferent messages (individual messages) and send those individual messages to others message channels. Here's a example of this action:
> 				<action name="splitter" class="org.jboss.soa.esb.actions.Splitter">
> 					<property name="destinations">
> 						<route-to
> 							service-category="Enterprise Business Services"
> 							service-name="FirstService">
> 							<message-splitter
> 								smooksConfig="/META-INF/smooks-res-1.xml"
> 								resultType="STRING" />
> 						</route-to>
> 						<route-to
> 							service-category="Enterprise Business Services"
> 							service-name="SecondService">
> 							<message-splitter
> 								smooksConfig="/META-INF/smooks-res-2.xml"
> 								resultType="JAVA" />
> 						</route-to>
> 					</property>
> 				</action>
> I've implemented this action and it is fully working in the following enviroment:
> OS: Red Hat Enterprise Linux 5
> JVM: Sun JDK 1.5-16
> JBoss ESB 4.5
> I would like that this feature would be available in the JBoss ESB and the SOA Platform product, since, I've customers that asked me for this kind of feature.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the esb-issues mailing list