|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
How to use MQIA_CHANNEL_EVENT with MQINQ to inquire cha |
« View previous topic :: View next topic » |
Author |
Message
|
mquser01 |
Posted: Mon Apr 14, 2008 1:49 am Post subject: How to use MQIA_CHANNEL_EVENT with MQINQ to inquire cha |
|
|
Acolyte
Joined: 06 Mar 2008 Posts: 52
|
I want to programatically inquire the channel status. I thought of using MQIA_CHANNEL_EVENT for the same.. Is my approach right?? if yes how to use it?? does anyone has a sample code for the same???
If there is some other way by means of which we can determine the channel status programatically so that i can alert the programmer when channel status goes into retrying state or is stopped ... |
|
Back to top |
|
 |
Vitor |
Posted: Mon Apr 14, 2008 1:58 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Slightly off topic, but why are you attempting this? As has been discussed many times before, what you're trying is exactly what most monitoring solutions have already achieved. The TCO for any solution you produce is likely to be higher than a commercial solution, and a commercial solution may offer other benefits (e.g. able to monitor other components of your software stack than just MQ).
Moving back to your query, a channel in RETRY status is not worth reporting. It's likely the network has blipped, and the channel will recover in a short period of time (exactly as it's designed to do).
Also you shouldn't alert the programmer. The programmer (or application user) should neither know nor care if the channel is working or not any more than the application itself should have any interest. Notify the MQ admin, or the network people. It's most likely to be a network problem.
My 2 cents - I'd not use events. Having the queue manager generating events is an unnecessary overhead given how infrequently the channel will stop. I'd have an externally scheduled job which checks the status every few minutes or so depending on your SLA. It really depends on why you're checking the channel (business requirements for instance) and what other monitoring you have (e.g. can the network independantly detect a downed link?)
Other views are equally supportable. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
RogerLacroix |
Posted: Mon Apr 14, 2008 6:36 pm Post subject: Re: How to use MQIA_CHANNEL_EVENT with MQINQ to inquire cha |
|
|
 Jedi Knight
Joined: 15 May 2001 Posts: 3264 Location: London, ON Canada
|
|
Back to top |
|
 |
bruce2359 |
Posted: Tue Apr 15, 2008 8:00 am Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 Location: US: west coast, almost. Otherwise, enroute.
|
Quote: |
so that i can alert the programmer when channel status goes into retrying state or is stopped ... |
An application that MQPUTs a Request message into a transmission queue can wait for a reply - this is the usual behavior of a client-server type of application.
WMQ delivers messages asynchronously. This means that the programmer can only guess as to why a Reply hasn't arrived; and write some code to give up waiting after some time-period - usually the time an end-user will wait before assuming that all has failed. Refer to MQGET with a WaitInterval in the Application Programmers Reference/Guide manuals.
What do you do when the Reply doesn't arrive in a 'reasonable' timefrane?
Application programs should be written to be sensitive to both duplicate and missing Request/Replies, and re-send as necessary.
As mentioned earlier in this post, knowing the channel status at an instant in time does not offer much information. Channel (network) problems are transitory. A channel might go into retry for a microsecond, then recover. There is no need for programmers to do this, as WMQ has recovery channel software build-in. _________________ I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live. |
|
Back to top |
|
 |
AkankshA |
Posted: Tue Apr 15, 2008 9:17 pm Post subject: Re: How to use MQIA_CHANNEL_EVENT with MQINQ to inquire cha |
|
|
 Grand Master
Joined: 12 Jan 2006 Posts: 1494 Location: Singapore
|
mquser01 wrote: |
I want to programatically inquire the channel status. I thought of using MQIA_CHANNEL_EVENT for the same.. Is my approach right?? if yes how to use it?? does anyone has a sample code for the same???
If there is some other way by means of which we can determine the channel status programatically so that i can alert the programmer when channel status goes into retrying state or is stopped ... |
i would simply write a shell script which does runmqsc and gets me the status using display chstatus comand.... rather then going for events which as vitor said is unnecessary overhead.. <If all i want is to know the channel status (retrying)> _________________ Cheers |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|