Using PyMQI, which is fine on IBM MQ Single instance queues, but does anyone know if I can pass dual IP Addresses and Ports on the connection string and if the MQ CLient under the hood handles the IBM MW Multi Instance queue management ?
Asked
Active
Viewed 763 times
1 Answers
1
PyMQI sits on top of the underlying MQ libraries. If you are using it with MQ v7.0 or higher then you can specify multiple connection names that are separated by a comma. It will then try each one in order and loop back to the first one if it can not connect to any of them. Some settings related to how long it will retry and how often can be set in the mqclient.ini.
The IBM Knowledge center page "Automatic client reconnection" has good general information on the reconnect options. All of it related to the C/C++ clients applies to PyMQI.

JoshMc
- 10,239
- 2
- 19
- 38
-
Thank you JoshMc - most helpful - so - if I understand correctly, I would do something like this: – Tim C Feb 21 '17 at 15:54
-
import pymqi, qmgr=pymqi.connect ('QM1', 'SVRCONN.CHHANNEL.1', 192.168.1.30 (1434), 192.168.1.31 (1434)') – Tim C Feb 21 '17 at 15:56
-
then I could just use my function thus: getq=pymqi.Queue(qmgr, 'TESTQ.1') – Tim C Feb 21 '17 at 15:57
-
that ends with: print("here's the message:", getq.get()) – Tim C Feb 21 '17 at 16:02
-
Sorry its split over several comments - not got the hang of multi-lines on this forum – Tim C Feb 21 '17 at 16:03
-
I think you are missing a single quote. Besides that it should work. – JoshMc Feb 21 '17 at 16:32