Sending a message from a client to a server
Before you begin
Before putting a test message on the queue, you must already have completed the following tasks in this tutorial:
In this part of the tutorial, you will send a message from the client to the server queue
manager QM_ORANGE, which uses the remote queue definition and other IBM MQ objects defined in earlier tutorials to route the message
onto queue manager QM_APPLE and to queue Q1.
On Windows, the sample programs are installed by default with IBM MQ Server or Client.
On Linux , the sample programs RPM will need to be installed.
Open a command prompt on the client and follow these steps:
Procedure
-
Start the amqsputc 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:
./amqsputc Q1
- On Windows, type the command:
amqsputc Q1
target queue is Q1 - 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:
- Type some message text on one or more lines, then press Enter twice.
The following message is displayed:Sample AMQSPUT0 end