简体   繁体   English

IBM MQ 删除不需要的数据

[英]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.我正在尝试将一串消息发送到一个主题并使用 MQGET 调用从该主题中检索。 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. https://www.ibm.com/docs/en/ibm-mq/9.2?topic=calls-mqget-get-message在此链接中定义,数据长度是从主题接收到的消息的总大小。 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.因此,一定是 IBM MQ 正在使用标头和属性填充消息,而这些只是将字符串发送到主题时不需要的。

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.您可以使用 MQGMO 属性选项来控制包含哪些属性以及这些属性是作为消息头返回还是在单独的消息句柄中返回。 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您可能想要设置 MQGMO_NO_PROPERTIES 选项,此处记录: https://www.ibm.com/docs/en/ibm-mq/9.2?topic=mqgmo-options-mqlong

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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