Sun Java System Message Queue 4.3 Developer's Guide for C Clients


The MQSetBytesMessageBytes function defines the body for a bytes message.

                  (const MQMessageHandle messageHandle,
                   const MQInt8 * messageBytes,
                   MQInt32 messageSize);

Return Value

MQStatus. See the MQStatusIsError() function for more information.



A handle to an MQ_BYTES_MESSAGE message whose body you want to set.


A pointer to the bytes you want to set. The library makes a copy of the message bytes.


An integer specifying the number of bytes in messageBytes .

After you obtain the handle to a bytes message from MQCreateBytesMessage , you can use this handle to define its body with the MQSetBytesMessageBytes() function, to set its application-defined properties with the MQSetMessageProperties() function, and to set certain message headers with the MQSetMessageHeaders() function.