Putting messages on a local queue using the MQPUT call
As input to the MQPUT call, supply:
- A connection handle (Hconn).
- A queue handle (Hobj).
- A description of the message that you want to put on the queue. This is in the form of a message descriptor structure (MQMD).
- Control information, in the form of a put-message options structure (MQPMO).
- The length of the data contained within the message (MQLONG).
- The message data itself.
The output from the MQPUT call is
- A reason code (MQLONG)
- A completion code (MQLONG)
If the call completes successfully, it also returns your options structure and your message descriptor structure. The call modifies your options structure to show the name of the queue and the queue manager to which the message was sent. If you request that the queue manager generates a unique value for the identifier of the message you are putting (by specifying binary zero in the MsgId field of the MQMD structure), the call inserts the value in the MsgId field before returning this structure to you. Reset this value before you issue another MQPUT.
There is a description of the MQPUT call in the Application Programming Reference.
The following sections describe the information that supply as input to the MQPUT call.
- Specifying handles
- Defining messages using the MQMD structure
- Specifying options using the MQPMO structure
- The data in your message
Parent topic:
Putting messages on a queue
fg12320_