Verifying that the test message was sent

Before you begin

Before getting the test message from the local queue, you must already have completed the following tasks in this tutorial:

About this task

This topic shows how to verify that the test message was sent.
You can perform this task using either of the following interfaces:
  1. Use the IBM® MQ Explorer graphical interface
  2. Use the IBM MQ Script Command (MQSC) command-line interface

Procedure

  • [OPTION 1] Use the IBM MQ Explorer graphical interface to verify that the test message was sent.
    1. In the Navigator view, expand the Queue Managers folder, then expand QM_APPLE.
    2. Click the Queues folder.
    3. In the Content view, right-click Q1, then click Browse Messages.
      The Message browser opens to show the list of the messages that are currently on Q1.
    4. Double-click the last message to open its properties dialog.

    On the Data page of the properties dialog, the Message data field displays the content of the message in human-readable form, as shown in the following screen capture:

    A screen capture of the Message browser dialog and the message's properties dialog.

  • [OPTION 2] Use the IBM MQ Script Command (MQSC) command-line interface to verify that the test message was sent.

    The amqsget sample program is used to get the message back from the queue.

    1. Open a command prompt.
    2. Start the amqsget sample program:
      • [Windows]On Windows, type the following command:
        
        amqsget Q1 QM_APPLE
      • [Linux]On Linux®, change to the MQ_INSTALLATION_PATH/samp/bin directory, where MQ_INSTALLATION_PATH represents the high-level directory in which IBM MQ is installed. Type the following command:
        
        ./amqsget Q1 QM_APPLE

    The sample program starts, and your message is displayed along with any other messages on this queue. After a pause of 15 seconds, the sample ends and the command prompt is displayed again.

    You have now completed this tutorial.