+

Search Tips | Advanced Search

Getting a message from the queue LQ1

Get a message from the queue LQ1 by using the command-line interface.


About this task

IBM MQ comes with a sample application called amqsget. This application reads messages from a queue.

To get a message from the queue by using the command-line interface, complete the following steps.


Procedure

Use the amqsget sample application to read a message on the queue LQ1, by typing the following command:
amqsget LQ1 QM1
When the sample application starts, the following output is displayed:
C:\>amqsget LQ1 QM1
Sample AMQSGET0 start
message <Hello World>
no more messages
Sample AMQSGET0 end
The amqsget application ends 30 seconds after reading the message.


What to do next

Follow the instructions in subsequent scenarios to explore further IBM MQ features.

To learn about writing queuing applications, connecting to and disconnecting from a queue manager, publish/subscribe, and opening and closing objects, see Writing a procedural application for queuing.

Parent topic: Installing and configuring using the command line interface

Last updated: 2020-10-04