如何通过JMS API设置MQMD ApplicationID字段? [英] How to set MQMD ApplicationID field via JMS API?
问题描述
我正在使用JMS API将消息发送到Websphere MQ服务器。
拉取我创建的消息的应用程序要我将MQMD结构中的ApplicationID字段
设置为常量值。
我在JMS API中找不到访问MQMD结构的方法
I'm using the JMS API to send messages to a Websphere MQ server. The application that pulls the messages I create want me to set up the ApplicationID field in the MQMD structure to constant value. I could not find a way in the JMS API to access the MQMD structure
问题:有没有办法做到这一点?如果是,那怎么样?如果不是,那么我唯一的选择
是使用MQ java API而不是JMS API吗?
The question: Is there a way doing this? if yes then how? If no, then is my only option is to use the MQ java API, instead of JMS API?
推荐答案
从v7.0开始,您可以将所有MQMD字段作为JMS消息属性读取,并且可以以相同的方式设置其中的许多字段。
As of v7.0, you can read all the MQMD fields as JMS message properties and can set many of them the same way.
客户端和WMQ服务器都必须但是在v7.0或更高版本才能使用此功能。
Both the client and the WMQ server must be at v7.0 or higher to use this feature, though.
这篇关于如何通过JMS API设置MQMD ApplicationID字段?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!