WebSphere

Dynamic routing using message filtering

Choose which service is used at run time, by filtering a message.

About this task

If your goal is to have service requests routed to one of a predefined set of endpoints, you can achieve this by filtering your messages using the Message Filter mediation primitive.
Figure 1. Actor (service requester) and system (ESB)
Service requests can be routed to different service endpoints depending upon the contents of your message
To dynamically route services complete the following steps.
Note: these steps provide an overview, they do not include all instructions for creating a complete mediation module. You should refer to the WebSphere® Integration Developer for these instructions.
Procedure
  1. The integration developer creates and exports a mediation module by completing the following steps.
    1. Create and configure a mediation module containing a Message Filter mediation primitive. Use WebSphere Integration Developer to create a mediation module. Click this link to go to the topic for WebSphere Integration Developer.
    2. Define the filtering that should be performed. Update the Message Filter properties to define the filter patterns against which input messages are tested. You can define a number of filter patterns. Click this link to go to the topic for WebSphere Integration Developer.
    3. Define the endpoints that the filters should use. You can route messages that meet the same filter pattern to different endpoints, or you can route messages that meet different filter patterns to the same endpoint. You determine whether messages can be sent to multiple endpoints or one endpoint, by setting the Distribution mode property.
    4. Optional: Ensure that you can adjust aspects of your routing, from the administrative console. Promote the properties that you want to control. WebSphere Integration Developer lets you promote mediation primitive properties so they are visible from the runtime administrative console as module properties. You give alias names to promoted properties; and it is the alias names that are displayed on the runtime administrative console. Click this link to go to the topic for WebSphere Integration Developer.
    5. Export the mediation module. From WebSphere Integration Developer export the mediation module as an EAR file. Click this link to go to the topic for WebSphere Integration Developer.
  2. The runtime administrator deploys and administers the mediation module by completing the following steps.
    1. Deploy the mediation module. Use the runtime administrative console to install the EAR file as a new application. Click this link to go to the topic for WebSphere ESB. Click this link to go to the topic for WebSphere ESB for z/OS. Click this link to go to the topic for WebSphere Process Server. Click this link to go to the topic for WebSphere Process Server for z/OS.
    2. Optional: Check that your mediation module has the correct properties. You can check and set the values of promoted properties using the administrative console. Click this link to go to the topic for WebSphere ESB. Click this link to go to the topic for WebSphere ESB for z/OS. Click this link to go to the topic for WebSphere Process Server. Click this link to go to the topic for WebSphere Process Server for z/OS.
    3. Start the application associated with the mediation module. Use the runtime administrative console to start the application associated with the SCA module (mediation modules are types of SCA modules). Click this link to go to the topic for WebSphere ESB. Click this link to go to the topic for WebSphere ESB for z/OS. Click this link to go to the topic for WebSphere Process Server. Click this link to go to the topic for WebSphere Process Server for z/OS.

Results

When a service request invokes your mediation module, the service request will be routed based upon your filtering criteria.

Example

Figure 2. Dynamic Routing using the Message Filter mediation primitive
Message Filter mediation primitive routing messages based on message content

task Task topic

Terms of use | Feedback


Timestamp icon Last updated: 20 June 2010 00:38:50 BST (DRAFT)


http://publib.boulder.ibm.com/infocenter/dmndhelp/v6r2mx/topic//com.ibm.websphere.wbpm.scenarios.esb1.620.doc/tasks/twesb_usecasedynamicrouting3.html
Copyright IBM Corporation 2005, 2010. All Rights Reserved.
This information center is powered by Eclipse technology (http://www.eclipse.org).
iDoc on