EXAMPLE 1

4.2 Producer Tool

The producer tool when run performs the following actions:

  1. Create a connection with the message broker. The URL of the message broker in this example tcp://localhost:61616 can be specified as a parameter.
  2. Create a session. A queue is configured per session. The queue can either be name or a default queue.
  3. Create a message producer whose destination is configured to be the queue created in step 2. Delivery mode can be PERSISTENT or NON_PERSISTENT.
  4. A send loop that periodically sends text messages to the destination.

 

Output after running the Producer Tool is here.