0

Effectively, I need to monitor a queue and swap over its consumer to a stub when the actual consumer is disconnected for a length of time. I think I can get by by just seeing what IP addresses are connected to the queue in question. I've gone through the documentation but can't see how to do that in pymqi.

Cheers

A method that tells me the status of a queue including IP addresses

1 Answers1

1

It's possible but not that simple.

The MQSC commands that would give you that level of admin information would be something like "DISPLAY QSTATUS(qname) TYPE(HANDLE)". Which could be converted into PCF messges that could then be sent, and the response parsed, using pymqi. Working with PCF is not the easiest thing but it can be done.

Alternatively, you could use the REST API if that's enabled on the qmgr - REST can be done from just about any language environment or even scripted with curl.

Depending on what you really need, then perhaps simply doing an MQINQ to get MQIA_OPEN_INPUT/OUTPUT_COUNT values would be sufficient. You can then just see if anyone has the queue open.

Mark Taylor
  • 868
  • 1
  • 5
  • 6