Destination routing paths

A routing path defines a sequential list of intermediary bus destinations that messages must pass through to reach a target bus destination. A routing path is used to apply the mediations configured on several destinations to messages sent along the path.

In the following figure, a destination is configured with a forward routing path that defines a sequence of destinations that a message should pass along from producer to consumer.

This figure is described in the surrounding text.

A forward routing path identifies a list of bus destinations that a message should be sent to from the producer to the last destination from which consumers retrieve messages. The reverse routing path is constructed automatically for request/reply messages, and identifies the list of destinations that any reply message should be sent to from the consumer back to the producer. Use of reverse routing path enables a reply message to take a different route back to the producer, and therefore have more mediations applied.

When a message arrives at a destination in the path, mediations can manipulate the entries in the forward routing path, to change the sequence of destinations through which messages pass. If a mediation manipulates the forward routing path, and the reverse routing path has been set (for a request message that expects a reply), then the mediation is responsible for making any corresponding changes to the reverse routing path.

A destination without mediations can be included in a routing path to provide a future option to apply a mediation assigned to that destination.

A topic space should only be included as the last destination of a forward routing path. If, after invoking any mediations defined at a topic space the forward routing path is not empty, the message is sent to the exception destination defined for the topic space. A forward routing path can be configured with a topic space as an intermediary destination, provided that mediations along the routing path take appropriate action (such as to avoid the topic space) before messages reach the topic space.

If the first element of the routing path does not represent a destination known to the bus, then the message is sent to the exception destination defined for the current destination.

Forward routing paths

A producer can attach to one destination and pass messages along a forward routing path to the target destination that consumers use.
  • The producer can set the forward routing path in the original message.
  • An administrator can configure a default forward routing path on destinations for use by messages that do not contain a forward routing path.
When a message is sent to a destination (either directly, or as a result of following its forward routing path), and before invoking any mediation at the destination, the Default forward routing path property of the destination is applied to the forward routing path of the message, as follows:
  • If the incoming message contains an empty forward routing path, then the forward routing path in the message is set to the value of the Default forward routing path property of the destination (which also can be empty or null).
  • If the incoming message has a non-empty forward routing path, then it is left unchanged. After applying any mediations, the message is forwarded to the next destination in the path. When the last destination in the path is reached, the message is handled by that destination.

Reverse routing paths

A producer can ask for reply messages, by specifying a reply destination in messages it sends. The reverse routing path is constructed dynamically as the message passes from one destination to another along the forward routing path.

When a message is sent to a destination (either directly, or as a result of following its forward routing path), and before invoking any mediation at the destination, this Reply destination property of the destination is applied to any non-empty reverse routing path of the message, as follows:
  • If the incoming message has a non-empty reverse routing path (indicating that a reply is expected), then the value of the Reply destination property of the destination is added to front of the reverse routing path in the message (indicating that this new reply destination should be visited by the reply message before any destinations already in the reverse routing path).
  • If the incoming message has an empty reverse routing path (indicating that a reply is not expected), then it is left unchanged.



Related concepts
Learning about bus destinations
Related tasks
Configuring a destination forward routing path
Configuring a destination reverse routing path
Concept topic Concept topic    

Terms and conditions for information centers | Feedback

Last updatedLast updated: Aug 31, 2013 1:23:07 AM CDT
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=pix&product=was-nd-dist&topic=cjo0005_
File name: cjo0005_.html