Setting MQ header in java client

I want to set the MQ header field "PutApplName" in my java client and access the same in the JMSXAppID field as a JMS header. Documents on the net say that the MQ header fields are mapped to JMS. Has anyone tried this?

+3
source share
1 answer

You must use WMQ v7 on the client and server to do this in JMS portable mode. Since v6 is the end of life next year, I hope you are already on v7 anyway. In v7, all MQMD properties are accessible using message properties. In v6, you had to go down to the WMQ-specific Java classes, and that was ugly.

, , JMS- MQMD, MQMD JMS.

, MQMD WMQ. WMQ-, jar, : C:\Program Files\IBM\WebSphere MQ\tools\jms\samples\simple\SimpleMQMDWrite.java

WMQConstants, . WMQConstants . JMS_IBM_MQMD_PUTAPPLNAME . JavaDoc :

JMS_IBM_MQMD_PUTAPPLNAME

public static final String JMS_IBM_MQMD_PUTAPPLNAME

JMS_IBM_MQMD_PUTAPPLNAME . MQ . setStringProperty (JmsConstants.JMS_IBM_MQMD_PUTAPPLNAME,); getStringProperty (JmsConstants.JMS_IBM_MQMD_PUTAPPLNAME); Message.

, + mqm ( ), setmqaut. + setall QMgr, .

+4

Source: https://habr.com/ru/post/1755720/


All Articles