Nitin B
Nitin B

Reputation: 1

how to retrieve RFH message headers from a message coming from MQ?

Can anyone please help me in retrieving message headers from the message coming from Websphere IBM MQ ?

We are using JMS OnMessage method to browse the MQ and the type of message received from MQ is "BytesMessage". We want to iterate through the RFH message headers and collect them.

We have tried using MQHeaders to iterate over the MQMessage but could not as it was throwing an exception.

Please advice me.

Upvotes: 0

Views: 982

Answers (1)

Axel Podehl
Axel Podehl

Reputation: 4303

a good place to start reading is https://www.ibm.com/support/knowledgecenter/en/SSFKSJ_8.0.0/com.ibm.mq.dev.doc/q031990_.htm which explains how IBM MQ implements JMS.

Next you should print out your received JMS Message with toString() or iterate through your properties and check the properties you receive. Depending on RFH or RFH2 you will see different fields.

You can find explanations for these fields in https://www.ibm.com/support/knowledgecenter/SSFKSJ_8.0.0/com.ibm.mq.dev.doc/q032000_.htm and https://www.ibm.com/support/knowledgecenter/SSFKSJ_8.0.0/com.ibm.mq.dev.doc/q032060_.htm

Upvotes: 1

Related Questions