The MQGetMessageProperties function passes back the user-defined properties for a message.
MQGetMessageProperties (const MQMessageHandle messageHandle, MQPropertiesHandle * propsHandle); |
MQStatus. See the MQStatusIsError() function for more information.
A handle to a message whose properties you want to get.
Output parameter for the handle to the message properties.
The MQGetMessageProperties function allows you to get application-defined properties for a message. Properties allow an application, via message selectors, to select or filter messages on its behalf using application-specific criteria. Having obtained the handle, you can either use one of the MQGet...Property functions to get a value (if you know the key name) or you can iterate through the properties using the MQPropertiesKeyIterationStart() function.
You will need to call the function MQFreeProperties() to free the resources associated with this handle after you are done using it.
MQ_NO_MESSAGE_PROPERTIES