如何通过JMS API设置MQMD ApplicationID字段? [英] How to set MQMD ApplicationID field via JMS API?

查看:209
本文介绍了如何通过JMS API设置MQMD ApplicationID字段?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用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.

请参阅: http://publib.boulder.ibm。 com / infocenter / wmqv7 / v7r0 / topic / com.ibm.mq.csqzaw.doc / jm41030_.htm

客户端和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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆