简体   繁体   中英

IBM MQ remove unwanted data

Could anyone explain how can we reduce total message data send to a topic, like unnecessary message headers. I am trying to send a string of message to a topic and retrieve from that topic using an MQGET call. https://www.ibm.com/docs/en/ibm-mq/9.2?topic=calls-mqget-get-message as defined in this link, datalength is the total size of message received from the topic. The difference of datalength and actual string size is very different. datalength is much more higher than the actual string I am sending.

So it must be that IBM MQ is padding the message with headers and properties which are not required for just sending a string to a topic.

Can we disable the unused headers and properties so that the datalength can come down?

You can use MQGMO properties options to control which properties are included and whether the properties are returned as message headers or in a separate message handle. You might want to set the MQGMO_NO_PROPERTIES option, documented here: https://www.ibm.com/docs/en/ibm-mq/9.2?topic=mqgmo-options-mqlong

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM