Author |
Message
|
mikeHT |
Posted: Tue Apr 04, 2006 5:47 am Post subject: Most efficient way to check if local qmgr/queues are availab |
|
|
Voyager
Joined: 01 Jul 2005 Posts: 82
|
Hi everyone:
What is most efficient way and best practice using MQ API to check if local qmgr/queues are available on windows2003 using VB .NET?
What would be a good/efficient way using MQ API to check if queuecluster is available for MQputs.
Could you post some samples.
Thank you. |
|
Back to top |
|
 |
jefflowrey |
Posted: Tue Apr 04, 2006 5:52 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
The best way to find out if a queue manager is available for connections is to connect to it.
The best way to find out if a queue is available for PUTting is to PUT a message to it.
There are a VB.NET samples installed on your machine if you installed the SDK/samples.
Also a simple bit of Googling should find a lot more. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
Vitor |
Posted: Tue Apr 04, 2006 5:53 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Aside from trying to connect / put & checking for a non-zero return code you mean?
Is your requirement for a monitoring tool, possibly scheduled? _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
mikeHT |
Posted: Tue Apr 04, 2006 7:11 am Post subject: |
|
|
Voyager
Joined: 01 Jul 2005 Posts: 82
|
The applications (13 instances in all) would poll the clusterqueuealias targeting remote queue (for put) and clusterqueuealias targeting localqueues for gets every 0.1 sec. If qmgr is not available, there will be lots of events generated, flooding the Eventviewer. We would like to make code change to application so that if qmgr or remote clusterqa is not available (due to cluster/channel/system.cluster.transmit.queue issues), that the application will just exit instead of polling the queues. Thank you |
|
Back to top |
|
 |
Vitor |
Posted: Tue Apr 04, 2006 7:26 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
mikeHT wrote: |
We would like to make code change to application so that if qmgr or remote clusterqa is not available (due to cluster/channel/system.cluster.transmit.queue issues), that the application will just exit instead of polling the queues. Thank you |
So change the code so that, in the event the application determines qmgr or remote cluster is unavailable, the application will just exit. I would suggest by reference to the return & reason codes.
Seriously, if these are VB applications then raising of events or not is under application control. Simply code them such that they don't raise events for "expected" conditions - in the same way I imagine they don't raise events for 2033 codes if they're polling.
More seriously, if I've failed to fully grasp your requirements please accept my apologies and try again. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
|