I was trying to send message(with rfh2 header) using python. But getting the below error. Is there a proper way to send the message successfully to MQ? Code is given below.
ERROR:[MWI_B2BTransactionLogger|A|M|FC]DataError - Input WMQ message missing the MQRFH2/usr - MQMD USR folder:
import pymqi
qm_name='Axxx'
channel='Gxxxx'
host='uxxxx'
port='1xx'
conn_info='%s(%s)' % (host, port)
file_name="/xxxxx/Test01_InsertSucess01.dat"
q_name="Axxxxx.FLOWQ"
qm=pymqi.QueueManager(None)
qm.connectTCPClient(qm_name,pymqi.cd(),channel,conn_info)
queue=pymqi.Queue(qm,q_name)
with open(file_name, 'rb') as f:
data=f.read()
queue.put(data)
queue.close()
The first question is: Why do you want to send a message as an RFH2 message?
(1) I don't see anywhere in your code that you are setting the MQMD Format field. (2) I don't see the creation of the MQRFH2 header and folders in the code. i.e.