0

I am trying to read some MQ varaibles using python, for example :

print('High Queue depth:', qq.inquire(pymqi.CMQC.MQIA_HIGH_Q_DEPTH))

when I run it I got this error :

 File "depth.py", line 32, in <module>
print('High Queue depth:', qq.inquire(pymqi.CMQC.MQIA_HIGH_Q_DEPTH))
File "/home/vagrant/miniconda2/lib/python2.7/site-packages/pymqi.py", line 1766, in inquire
raise MQMIError(rv[-2], rv[-1])
pymqi.MQMIError: MQI Error. Comp: 2, Reason 2067: FAILED: MQRC_SELECTOR_ERROR
JoshMc
  • 10,239
  • 2
  • 19
  • 38
Donia
  • 143
  • 1
  • 2
  • 10

1 Answers1

0

The MQ reason code MQRC_SELECTOR_ERROR (2067) means that you cannot inquire that attribute (MQIA_HIGH_Q_DEPTH) on that object.

MQIA_HIGH_Q_DEPTH is not a queue attribute, it is a constant value used inside an event message. I suspect you are trying to inquire the current depth of your queue? If so, the attribute you should be using is MQIA_CURRENT_Q_DEPTH. You can see the full list of MQINQ-able attributes of queue in TableĀ 1. MQINQ attribute selectors for queues, so if that's not the one you wanted (my guess) then you can select one that is appropriate from that list.

Morag Hughson
  • 7,255
  • 15
  • 44