Starting the Subscriber Clients
You start the subscribers first because they enable you to observe the messages being received when you start the publisher.
Procedure
To start
user1 as a subscriber:
-
In the first command line window, navigate to EMS_HOME/samples/java.
-
Enter setup to set the environment and classpath:
> setup -
Execute the
tibjmsMsgConsumerclient to assignuser1as a subscriber to themyTopictopic:> java tibjmsMsgConsumer -topic myTopic -user user1The screen will display a message showing that
user1is subscribed tomyTopic.
To start user2 as a subscriber:
-
In the second command line window, navigate to the
EMS_HOME/samples/javafolder. -
Enter setup to set the environment and classpath:
> setup -
Execute the
tibjmsMsgConsumerapplication to assignuser2as a subscriber to themyTopictopic:> java tibjmsMsgConsumer -topic myTopic -user user2The screen will display a message showing that
user2is subscribed tomyTopic.Note: The command windows do not return to the prompt when the subscribers are running.