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
tibjmsMsgConsumer
client to assignuser1
as a subscriber to themyTopic
topic:> java tibjmsMsgConsumer -topic myTopic -user user1
The screen will display a message showing that
user1
is subscribed tomyTopic.
To start user2
as a subscriber:
-
In the second command line window, navigate to the
EMS_HOME/samples/java
folder. -
Enter setup to set the environment and classpath:
> setup
-
Execute the
tibjmsMsgConsumer
application to assignuser2
as a subscriber to themyTopic
topic:> java tibjmsMsgConsumer -topic myTopic -user user2
The screen will display a message showing that
user2
is subscribed tomyTopic
.Note: The command windows do not return to the prompt when the subscribers are running.