After you have imported and deployed the sample, you can run it by following the instructions in the Running the sample section.
If you encounter any problems when you run the sample, see Resolving problems when running samples in the WebSphere Message Broker documentation.
This topic also includes an example input test message and a corresponding output message so that you can confirm that the sample has worked.
The test message that is used to run this sample is based on the following format:
<routingfilenode>
<routingvalue>out</routingvalue>
</routingfilenode>
where the value out contains the key identfier that is used to look up the terminal to which the message is routed, from the routingtable.cfg properties file. This file is a simple text file containing:
out out alternate alternate
To route the message to the alternate node, edit the input message and replace out with alternate.
This sample uses the message flow RoutingFileNodeFlow.
It contains one input queue called JAVACOMPUTE.ROUTING.IN.
The message flow can route the message to one of three output queues (JAVACOMPUTE.ROUTING.OUT,
JAVACOMPUTE.ROUTING.ALTERNATE, and JAVACOMPUTE.ROUTING.FAILURE).
To run the sample:
Edit the input message so that out is replaced with alternate, and then try repeating the previous steps. The message is routed to the JAVACOMPUTE.ROUTING.ALTERNATE queue instead.
If all the preceding steps are successful, the sample is complete. Look at the Java code in the RoutingFileNodeFlow message flow to see how the message routing was achieved.
The output message from the sample should be identical to the input message, because this sample covers only routing of messages, not transformation. When the input message contains a value of out, the message is routed to the Out terminal. If the input message contains alternate, it is routed to the Alternate terminal.
<routingfilenode>
<routingvalue>out</routingvalue>
</routingfilenode>