I am new to mqseries, and I started off with IBM WebSphere MQ misses. There are examples with queue managers MQ_APPLEand MQ_ORANGE. I have no problem sending messages to a local or remote queue with MQ Explorer, but I wanted to send such a message from code: Python or Java. I tried the pythqi Python library with this code:
import pymqi
qmgr = pymqi.QueueManager(None)
qmgr.connect('QM_APPLE')
putq = pymqi.Queue(qmgr, 'Q1')
putq.put('Hello from Python!')
but I get an error:
Traceback (most recent call last):
File "mq_put.py", line 4, in <module>
qmgr.connect('QM_APPLE')
File "c:\Python26\lib\site-packages\pymqi.py", line 758, in connect
raise MQMIError(rv[1], rv[2])
pymqi.MQMIError: MQI Error. Comp: 2, Reason 2540: FAILED: MQRC_UNKNOWN_CHANNEL_NAME
There is a queue manager QM_APPLEwith a local network Q1.
What is wrong with my code?
source
share