Verify that the test message was sent
Before starting
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.We can perform this task using either of the following interfaces:
- Use the IBM MQ Explorer graphical interface
- 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.
- In the Navigator view, expand the Queue Managers folder, then expand QM_APPLE.
- Click the Queues folder.
- 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.
- 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:
- [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.
- Open a command prompt.
- Start the amqsget sample program:
- On Windows, type the following command:
amqsget Q1 QM_APPLE- 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.
We have now completed this tutorial.
Parent topic: Tutorial 1: Sending a message to a local queue Previous topic: Put a test message on the local queue