This class represents an WebSphere MQ message. It includes properties to encapsulate the WebSphere MQ message descriptor (MQMD), and provides a buffer to hold the application-defined message data.
The class includes Write methods to copy data from an ActiveX application to an MQMessage object and similarly Read methods to copy data from an MQMessage object to an ActiveX application. The class manages the allocation and deallocation of memory for the buffer automatically. The application does not have to declare the size of the buffer when an MQMessage object is created because the buffer grows to accommodate data written to it.
You cannot place a message onto an WebSphere MQ queue if the buffer size exceeds the MaximumMessageLength property of that queue.
After it has been constructed, an MQMessage object may be Put onto an WebSphere MQ queue using the MQQueue.Put method. This method takes a copy of the MQMD and message data portions of the object and places that copy on the queue - so the application may modify or delete an MQMessage object after the Put, without affecting the message on the WebSphere MQ queue. The queue manager may adjust some of the fields in the MQMD when it copies the message on the WebSphere MQ queue.
An incoming message may be read into an MQMessage object using the MQQueue.Get method. This replaces any MQMD or message data that may already have been in the MQMessage object with values from the incoming message, adjusting the size of the MQMessage object's data buffer to match the size of the incoming message data.
Notices |
Downloads |
Library |
Support |
Feedback
![]() ![]() |
amq7456 |