LibraryToggle FramesPrintFeedback

The integration between Fuse Mediation Router and ServiceMix is provided by the servicemix-camel module. This module is provided with ServiceMix, but actually implements a plug-in for the Fuse Mediation Router product: the JBI component (see JBI in EIP Component Reference and JBI Component).

To access the JBI component from Fuse Mediation Router, make sure that the servicemix-camel JAR file is included on your Classpath or, if you are using Maven, include a dependency on the servicemix-camel artifact in your project POM. You can then access the JBI component by defining Fuse Mediation Router endpoint URIs with the jbi: component prefix.

ServiceMix defines a flexible format for defining URIs, which is described in detail in ServiceMix URIs. To translate a ServiceMix URI into a Fuse Mediation Router endpoint URI, perform the following steps:

  1. If the ServiceMix URI contains a namespace prefix, replace the prefix by its corresponding namespace.

    For example, after modifying the ServiceMix URI, service:test:messageFilter, where test corresponds to the namespace, http://progress.com/demos/test, you get service:http://progress.com/demos/test:messageFilter.

  2. Modify the separator character, depending on what kind of namespace appears in the URI:

    • If the namespace starts with http://, use the / character as the separator between namespace, service name, and endpoint name (if present).

      For example, the URI, service:http://progress.com/demos/test:messageFilter, would be modified to service:http://progress.com/demos/test/messageFilter.

    • If the namespace starts with urn:, use the : character as the separator between namespace, service name, and endpoint name (if present).

      For example, service:urn:progress:com:demos:test:messageFilter.

  3. Create a JBI endpoint URI by adding the jbi: prefix.

    For example, jbi:service:http://progress.com/demos/test/messageFilter.

For example, consider the following configuration of the static recipient list pattern in ServiceMix EIP. The eip:exchange-target elements define some targets using the ServiceMix URI format.

<beans xmlns:sm="http://servicemix.apache.org/config/1.0"
       xmlns:eip="http://servicemix.apache.org/eip/1.0"
       xmlns:test="http://progress.com/demos/test" >
    ...
    <eip:static-recipient-list service="test:recipients" endpoint="endpoint">
      <eip:recipients>
        <eip:exchange-target uri="service:test:messageFilter" />
        <eip:exchange-target uri="service:test:trace4" />
      </eip:recipients>
    </eip:static-recipient-list>
    ...
</beans>

When the preceding ServiceMix configuration is mapped to an equivalent Fuse Mediation Router configuration, you get the following route:

<route>
  <from uri="jbi:endpoint:http://progress.com/demos/test/recipients/endpoint"/>
  <to uri="jbi:service:http://progress.com/demos/test/messageFilter"/>
  <to uri="jbi:service:http://progress.com/demos/test/trace4"/>
</route>
Comments powered by Disqus
loading table of contents...