0

I want to set some jms properties while sending a message using pymqi to support different message parameters.

Below code is for reference only

import pymqi

queue_manager = 'QM1'

channel = 'DEV.APP.SVRCONN'

host = '127.0.0.1' 

port = '1414' 

queue_name = 'TEST.1' 

message = 'Hello from Python!' 

conn_info = '%s(%s)' % (host, port) 

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

queue = pymqi.Queue(qmgr, queue_name)

queue.put(message)

queue.close()

qmgr.disconnect()
Community
  • 1
  • 1
  • Have you reviewed the pymqi github issues list: I think there is an issue there related to message properties. In base MQ (not JMS or XMS) you would set message properties which would be available to a JMS app as JMS properties. – JoshMc Oct 07 '19 at 15:54
  • 1
    See this example: https://github.com/dsuch/pymqi/blob/master/code/examples/message_property_set.py – Morag Hughson Oct 07 '19 at 22:44

0 Answers0