I have to inject a message in IBM MQ.
Could you please explain me how to add a custom information in the header?
Please find below how I defined the RFH2 header and the message.
def message = new MQMessage()
def rfh2 = new MQRFH2()
rfh2.setEncoding(CMQC.MQENC_NATIVE)
rfh2.setCodedCharSetId(CMQC.MQCCSI_INHERIT)
rfh2.setFormat(CMQC.MQFMT_NONE)
rfh2.setNameValueCCSID(1208)
rfh2.setFieldValue('mcd', 'Msd', 'jms_byte')
rfh2.setFieldValue('usr', 'Sender', 'mysender')
rfh2.write(message)
message.writeString(mymessage)
message.format = CMQC.MQFMT_RF_HEADER_2
And I would like to add type
information. So the expected result is type='mytype'
.
There is a way, a method to do that please? I checked on the doc but I didn't found information.
Thank you for help. Regards.