Starting the Sender and Receiver Clients
- Procedure
- Open two command line windows and in each window navigate to the
EMS_HOME/samples/java
folder. - In each command line window, enter setup to set the environment and classpath:
> setup
- In the first command line window, execute the
tibjmsMsgProducer
application to direct user1 to place some messages to themyQueue
queue:> java tibjmsMsgProducer -queue myQueue -user user1 Hello User2
- In the second command line window, execute the
tibjmsMsgConsumer
client to directuser2
to read the messages from the message queue:> java tibjmsMsgConsumer -queue myQueue -user user2
The messages placed on the queue are displayed in the receiver’s window.
Note: Messages placed on a queue by the sender are persistent until acknowledged by the receiver, so you can start the sender and receiver clients in any order.