How to read values out of the WebSphrere MQ MQMD header with the IBM MQ libraries

前端 未结 1 446
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-01-25 07:44

Let\'s take this code snippet as a starting point:

import com.ibm.mq.MQEnvironment;
import com.ibm.mq.MQException;
import com.ibm.mq.MQGetMessageOptions;
import          


        
相关标签:
1条回答
  • 2021-01-25 08:15

    If you look at the JavaDoc for the MQMessage class (http://www-01.ibm.com/support/knowledgecenter/SSFKSJ_8.0.0/com.ibm.mq.javadoc.doc/WMQJavaClasses/com/ibm/mq/MQMessage.html)

    it extends the MQMD class (http://www-01.ibm.com/support/knowledgecenter/SSFKSJ_8.0.0/com.ibm.mq.javadoc.doc/WMQJavaClasses/com/ibm/mq/MQMD.html)

    and this has all the MQMD values on it.. so this code for example will show you the replyTo & type values

      System.out.println("MsgType="+ rcvMessage.messageType);
      System.out.println("ReplyToQ="+ rcvMessage.replyToQueueName);
      System.out.println("ReplyToQmgr="+ rcvMessage.replyToQueueManagerName);
    
    0 讨论(0)
提交回复
热议问题