Show TOC

Content-Based RoutingLocate this document in the navigation structure


In many business cases, it is necessary to define conditions with which the receivers of a message are determined during routing. For example, consider a condition in the following form: “If the value of a specific field in the message is x, then forward the message to receiver y.”

At configuration time, you can define conditions that depend on the content of the message. You can do this for both the determination of receiver communication components and inbound interfaces.

The following figure shows a simple example of content-based routing:

Figure 1: Basic Example for Content-Based Routing

The figure illustrates the following business case: Flight booking systems for different airlines are hosted on different systems. To ensure that the request for a flight availability check is forwarded to the correct airline, the routing condition is formulated as airline-dependent. The airline ID (field AirlineID) is contained in the payload of the message. The routing condition is as follows: Send the message requesting the flight availability check to the airline Lufthansa if the field AirlineID in the message payload has the value LH (Lufthansa). If this field has the value AA (American Airlines), then forward the message to the airline American Airlines .

A routing condition generally has the following syntax:

<element in the message> <Operand> <value>

The element in the message is identified by an XML Path Language ( XPath ) expression. XPath is a language that allows you to address parts of XML documents.

When you define a routing condition, you can use a condition editor. Using the condition editor, you do not need to worry about XPath syntax since you can conveniently identify a message element by clicking through the message structure displayed in the editor. Additionally, you can combine multiple conditions with logical AND and OR operators.