0

I want to see Message ID (MsgId) of a MQ message while doing a MQ GET call through Py-MQI. Below is my code but , I am not able to see the Message ID.

import pymqi

queue_manager = 'QM01'
channel = 'DEV.SRVCONN'
host = 'mqtest'
port = '1419'
queue_name = 'POC.XFER'
conn_info = '%s(%s)' %(host, port)

# Message Descriptor
md = pymqi.MD()

qmgr = pymqi.connect(queue_manager, channel, conn_info)

queue = pymqi.Queue(qmgr, queue_name)
message = queue.get(None, md)
print(str(message.decode()))
       
queue.close()     

qmgr.disconnect()
4

0 回答 0