Verify that the test message was sent


Before starting

Before getting the test message from the queue, we must already have completed the other tasks in this tutorial:


This topic shows how to verify that the test message was sent.We can perform this task using either of the following interfaces:

Parent topic: Tutorial 2: Sending a message to a remote queue Previous topic: Put a test message on the queue


Verify that the test message was sent using IBM MQ Explorer


About this task

Perform this task on the receiving machine (the machine that hosts the queue manager QM_APPLE).

On the receiving queue manager:


Procedure

  1. In the Navigator view, expand queue manager QM_APPLE.
  2. Click the Queues folder.
  3. In the Content view, right-click the queue 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 in the list to view its properties dialog.


Results

On the Data page of the properties dialog, the Message data field displays the content of the message in human-readable form.


Verify that the test message was sent using MQSC


About this task

You perform this task on the receiving machine (the machine that hosts the queue manager QM_APPLE). The amqsget sample program is used to get the message back from the queue.

Open a command prompt and follow these steps:


Procedure

Start the amqsget sample program as follows:

  • 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 command:
    ./amqsget Q1 QM_APPLE
  • On Windows, type the command:
    amqsget Q1 QM_APPLE


Results

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

You have now completed this tutorial.