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

You can determine the path that a message takes through the message flow by using the RouteToLabel and Label nodes.

About this task

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, by 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 (in the DestinationList folder in the local environment 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 local environment, see Local environment tree. For more information about casting, see Supported casts.