130 MQSeries Publish/Subscribe Applications
5.2.5 Example - migration of applications using streams
An example of a publish/subscribe application using streams is the soccer
sample included in MQSeries Publish/Subscribe SupportPac.
The sample is made of two applications:
The match simulator program (amqsgam.exe) that publishes non-retained
messages on topics Sport/Soccer/Event/MatchStarted,
Sport/Soccer/Event/ScoreUpdate and Sport/Soccer/Event/MatchEnded at
The results service program (amqsres.exe) that subscribes to
Sport/Soccer/Event/* at stream SAMPLE.BROKER.RESULTS.STREAM and
uses some service-retained topics to handle recovery logic.
We will describe how to migrate this MQSeries Publish/Subscribe sample to
In order to run the sample on a queue manager hosting an MQSeries Integrator
broker, you first need to execute the following MQSC scripts that come with the
sample: amqsfmda.tst, amqsgama.tst, amqsresa.tst.
Publication messages will be sent by the game simulator to the stream queue
SAMPLE.BROKER.RESULTS.STREAM. This queue has no special meaning for
MQSeries Integrator and by default is not served by any user message flow or
internal MQSeries Integrator component.
Using the Control Center we will create a modified version of the Default
Publish/Subscribe message flow named WMQ Pub/Sub Soccer Sample, whose
input node is configured to read from the
SAMPLE.BROKER.RESULTS.STREAM queue (see Figure 5-7 and the
WMQPubSubSoccerSampleMsgFlow.xml file in the additional material
accompanying this redbook).