The message routing use case shows how a database table can be used to store routing information, which a message flow can then use to route messages to WebSphere MQ queues.¬† It¬† implements a routing table, and uses shared variables to route messages in a message flow.
Results per platform
Results for the message routing use case can be found for each platform here:
The database table contains five columns:
- The first three columns contain look-up information that is derived from the incoming message.
- The last two columns contain the details of the queue and queue manager to which the message is routed.
The columns are shown in the following table:
|Variable1||The first variable that is used in looking up the destination queue (This variable is hard-coded in the sample and is not derived from the XML message).|
|Variable2||The second variable that is used in looking up the destination queue (This variable is derived from the XML message by using the Initial field).|
|Variable3||The third variable used in looking up the destination queue (This variable is derived from the XML message by using the Surname field).|
|Queue_manager||The destination queue manager name.|
|Queue_name||The destination queue name.|
Routing Using Memory Cache Message Flow
The top message flow performs the following processing:
- Reads a WebSphere MQ message containing an XML payload.
- Creates a destination list based on data that is held in shared variables.
- Produces a WebSphere MQ output message. The destination of the message is specified in the destination list.
The bottom¬†flow refreshes the shared variables from the DB but is only used to prime the shared variables in our results.