WebSphere Message Brokers
File: ac18700_
Writer: Karen Cameron

Task topic

This build: July 31, 2007 21:19:01

Using the destination list to route messages (RouteToLabel and Label nodes)

This topic describes how you can determine the path that a message takes through the message flow using the RouteToLabel and Label nodes.

These nodes provide a more flexible way to process messages than the Filter node, which depends on the Boolean result of an ESQL expression for its logic.

When you use RouteToLabel and Label nodes, you must include a Compute node that determines, using some combination of message content, database content, and ESQL logic, how messages are to be processed next. Configure the Compute node to create a destination list (within the DestinationList folder in the LocalEnvironment subtree) that contains the destination for each message, specified as the LabelName of a Label node. The Compute node passes the message to the RouteToLabel node, which reads the destination list and propagates the message to either the first or last item on the destination list, according to the value that is specified for the RouteToLabel node's Mode property. Although there is no limit to the number of destinations that the Compute node writes in the destination list, the RouteToLabel node propagates the message only to a single label node. This use of the destination list is in contrast to its use to define the final recipients of the output messages. For more information about the procedure for creating a destination list, see Creating destination lists.

If you intend to derive destination values from the message itself, or from a database, you might also need to cast values from one type to another. For more information about the LocalEnvironment, see LocalEnvironment tree structure. For more information about casting, see Supported casts.

Look at the following sample to see how to use these nodes:

The XML_PassengerQuery message flow in the Airline Reservations sample demonstrates how you can use the destination list in the LocalEnvironment to route messages based on the information in the message itself. You can view samples only when you use the information center that is integrated with the Message Brokers Toolkit.

Related concepts
Message flows overview
LocalEnvironment tree structure
Related tasks
Using nodes for decision making
Testing the message structure (Check node)
Controlling the order of processing within a message flow
Testing the message content (Filter node)
Related reference
Label node
RouteToLabel node
ResetContentDescriptor node
Notices | Trademarks | Downloads | Library | Support | Feedback

Copyright IBM Corporation 1999, 2007Copyright IBM Corporation 1999, 2007. All Rights Reserved.
This build: July 31, 2007 21:19:01

ac18700_ This topic's URL is: