SM-EIP service engine configuration ServiceMixion

<eip:content-based-router service="esb:simplerouter"     (Defines type
endpoint="routerEndpoint">                            of router)
<eip:rules>
<!-- # 1st routing rule -->
<eip:routing-rule>                                   (Adds routing
<eip:predicate>                                    rule)
<eip:xpath-predicate
xpath="/esb:order/esb:type=1"         (Evaluates incoming
namespaceContext="#nsContext" />       message)
<!-- if type=1-->
</eip:predicate>
<!-- forward msg to service -->
<eip:target>                                      (Targets service
<eip:exchange-target service="esb:orderService1" />
</eip:target>                                      for routing rule)
</eip:routing-rule>
<!-- # 2nd routing rule -->
<eip:routing-rule>                                   (Adds another
<eip:predicate>                                    routing rule)
<eip:xpath-predicate xpath="count(/esb:order/esb:type)=2"
namespaceContext="#nsContext" />
</eip:predicate>
<eip:target>
<eip:exchange-target
service="esb:orderService2" />
</eip:target>
</eip:routing-rule>
<!-- # 3rd routing rule -->
<eip:routing-rule>                                  (Targets service
<!-- w/o predicate ( default rule) -->
<eip:target>                                       for default rule)
<eip:exchange-target service="esb:orderService3" />
</eip:target>
</eip:routing-rule>
</eip:rules>
</eip:content-based-router>
<eip:namespace-context id="nsContext">                   (Defines namespace for
<eip:namespaces>                                       XPath expression)
<eip:namespace
prefix="esb">http://opensourceesb/architecture
</eip:namespace>
</eip:namespaces>
</eip:namespace-context>
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s