The Timeout Processing sample has two parts that are run separately:
If you encounter any problems when you run the sample, see Resolving problems when running samples in the WebSphere Message Broker documentation.
After the AutomaticTimeout message flow is deployed it runs automatically. Messages are displayed ten seconds apart on the TIMEOUT_SAMPLE_OUT_1 queue while the broker is running.
When the test has completed, repeat the procedure with the SetUnlimitedTimeout.mbtest file. This action writes a message containing an unlimited (non-terminating) timeout request to the TIMEOUT_SAMPLE_IN_2 queue, and copies of the original message are displayed on the TIMEOUT_SAMPLE_OUT_2 queue, ten seconds apart. The output messages contain a fragment (the first Invoice record) of the original input message.
The unlimited timeout request runs until it is told to finish. You can stop it with a corresponding cancellation request:
You can also stop the ten-times timeout request in the same manner, by using the CancelTenTimeout.mbtest file.
You can run the limited and unlimited timeouts together, by running both messages in the flow close together. The Controlled node processes them as they each run, and the output messages are mixed on the TIMEOUT_SAMPLE_OUT_2 queue. You cannot run two instances of either timeout request together, the second instance generates an error in the TimeoutControl node because it does not overwrite the existing request. This action is not a limitation of the Timeout nodes generally, it is a limitation of this sample; the timeout requests in the .mbtest files in the sample have hard-coded identifiers.
To view the messages on the TIMEOUT_SAMPLE_OUT_1 queue, use the following instructions:
The messages on the queue are automatically generated, and look like the following message:
<TimeoutRequest> <Action>SET</Action> <Identifier>SampleAuto</Identifier> <StartDate>2007-08-31</StartDate> <StartTime>13:04:12.295</StartTime> <Count>3</Count> <Interval>10</Interval> <IgnoreMissed>true</IgnoreMissed> <AllowOverwrite>true</AllowOverwrite> </TimeoutRequest>
To view the messages on the TIMEOUT_SAMPLE_OUT_2 queue, use the following instructions:
The messages on the TIMEOUT_SAMPLE_OUT_2 queue contain either the entire input message or a small part of it.