0

we start using pymqi instead of the java implementation. in java we had the option for 'QueueManager.close()'.

is there an option to close the queue manager using pymqi? I saw that inside __ del __ function we close the queue manager and then call disconnect, what if I want just to close without disconnecting? (also, I don't want to set the disconnect_on_exit to False, just want to have an option to call only to close)

reut
  • 41
  • 7

2 Answers2

1

What do you think that calling Close on a qmgr is meant to do? There's not really any such operation defined.

In the MQI, the only time you need to MQCLOSE an object is after you have MQOPENed it. And the only useful thing you can do with an MQOPEN on the qmgr object is to do an MQINQ against it. There's no QueueManager.open() function defined in this wrapper.

In the pymqi implementation, it looks like the QueueManager.inquire() function internally does an MQOPEN for the qmgr object and stashes the resultant hObj, It then does the corresponding MQCLOSE during the disconnect process. So that's why it doesn't need to be exposed.

Mark Taylor
  • 868
  • 1
  • 5
  • 6
0

You can disconnect from the queue manager, once you are done with your operations. You can use qmgr.disconnect()

Vishnu
  • 16
  • 4