EXAMPLE 1
The producer tool when run
performs the following actions:
- 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.
- Create a session. A queue
is configured per session. The queue can either be name or a default queue.
- Create a message producer
whose destination is configured to be the queue created in step 2. Delivery
mode can be PERSISTENT or NON_PERSISTENT.
- A send loop that
periodically sends text messages to the destination.
Output after running the Producer Tool is
here.