Defining messages using the MQMD structure

 

The message descriptor structure (MQMD) is an input/output parameter for the MQPUT and MQPUT1 calls. Use it to define the message you are putting on a queue.

If MQPRI_PRIORITY_AS_Q_DEF or MQPER_PERSISTENCE_AS_Q_DEF is specified for the message and the queue is a cluster queue, the values used are those of the queue to which the MQPUT resolves. If that queue is disabled for MQPUT, the call will fail. See WebSphere MQ Queue Manager Clusters for more information.

Use MQPMO_NEW_MSG_ID and MQPMO_NEW_CORREL_ID before putting a new message to ensure that the MsgId and CorrelId are unique. The values in these fields are returned on a successful MQPUT.

There is an introduction to the message properties that MQMD describes in WebSphere MQ messages, and there is a description of the structure itself in the Application Programming Reference.

 

Parent topic:

Putting messages on a local queue using the MQPUT call


fg12340_