+

Search Tips | Advanced Search

Put a test message on the queue

Put a test message on a remote queue using only the MQSC command-line interface.


Before starting

Before putting a test message on the queue, we must already have completed the following tasks in this tutorial:


About this task

Perform this task on the sending machine (the machine that hosts the queue manager QM_ORANGE).

The amqsput sample program is used to put a message onto the queue that you created:

  • On Windows, the sample programs are installed by default with IBM MQ Server or Client.
  • On Linux, the samples programs RPM need to be installed.


Procedure

  1. Open a command prompt.
  2. Start the amqsput sample program as follows:

    • On Windows, type the command:
      amqsput Q1 QM_ORANGE
      
    • On Linux, change to the /opt/mqm/samp/bin directory and type the command:
       ./amqsput Q1 QM_ORANGE
      

    The following messages are displayed:Sample amqsput0 start
    target queue is Q1

  3. Type some message text on one or more lines, then press Enter twice. The following message is displayed:Sample amqsput0 end


Results

We have now created a test message and put it onto the remote queue. The next task is to verify that the test message was received. Parent topic: Tutorial 2: Sending a message to a remote queue Previous topic: Create a message channel Next topic: Verify that the test message was sent

Last updated: 2020-10-04