Test the publish/subscribe cluster by publishing and subscribing to a topic string from different queue managers in the cluster.
About this task
Using the command line, and the amqspub
and amqssub
sample applications that are included with IBM® MQ , you can publish a topic from one queue manager and subscribe to the topic with the other queue managers. When a message is published to the topic, it is received by the subscribing queue managers.
Procedure
-
In the command line, enter the following command:
amqspub /Sport/Scores/Football PS1
-
Concurrently, in separate command lines, enter the following commands:
amqssub /Sport/Scores/Football PS2
amqssub /Sport/Scores/Football PS3
-
In the first command line, enter a message.
The message is displayed in both the subscribing command lines.
Note: The amqssub application will time out if a publication is not received for ten seconds.
Results
The publish/subscribe cluster set up is complete.
What to do next
Try defining different topic objects for different branches of the topic tree, and with different routing models.