Starting the Sender and Receiver Clients

Procedure

  1. Open two command line windows and in each window navigate to the EMS_HOME/samples/java folder.
  2. In each command line window, enter setup to set the environment and classpath:
    > setup
  3. In the first command line window, execute the tibjmsMsgProducer application to direct user1 to place some messages to the myQueue queue:
    > java tibjmsMsgProducer -queue myQueue -user user1 Hello User2
  4. In the second command line window, execute the tibjmsMsgConsumer client to direct user2 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.