Author |
Message
|
jstefano |
Posted: Wed Sep 13, 2006 8:22 am Post subject: how can we stop the MQ Manager when WebSphere server is down |
|
|
Apprentice
Joined: 13 Apr 2006 Posts: 48
|
Dear MQ Gurus!
We have an MQ Cluster with a Gateway, everything works great, but sometimes the WebSphere Application has a problem (it's still in DEV state) and all messages got stock in MQ Manager which is handling it.
If we stop that MQ Manager manually, Gateway will route all traffic to the good MQ Manager and Application is working fine again.
So, can somebody from you, MQ gurus out there give us a hint how can we stop the MQ Manager when WebSphere server is down?
As well, we can trigger this event by let say " if # of Messages in queue > 10 then do something" but we don't know how.
We tested it manually, we disabled "put message" on the queue and Gateway started routing all traffic to the second (good) MQ manager.
But how to do it automatically?
Any help will be appreciated a lot!
thanks
Jan |
|
Back to top |
|
 |
Ratan |
Posted: Wed Sep 13, 2006 9:35 am Post subject: |
|
|
 Grand Master
Joined: 18 Jul 2002 Posts: 1245
|
You cant do that automatically. Write a script to check your WebSphere Application. If it is down put disable the queue. _________________ -Ratan |
|
Back to top |
|
 |
vennela |
Posted: Wed Sep 13, 2006 9:57 am Post subject: |
|
|
 Jedi Knight
Joined: 11 Aug 2002 Posts: 4055 Location: Hyderabad, India
|
Quote: |
" if # of Messages in queue > 10 then do something" |
this can be done using performance events |
|
Back to top |
|
 |
jstefano |
Posted: Fri Sep 15, 2006 7:56 am Post subject: |
|
|
Apprentice
Joined: 13 Apr 2006 Posts: 48
|
Ratan wrote: |
You cant do that automatically. Write a script to check your WebSphere Application. If it is down put disable the queue. |
Hi there!
sorry for the late reply, I was out for few days.
Could you be so kind and let me know how to do that?
I know the UNIX portion, aka:
for x in 'ps -aef|grep web|grep -v "grep web" |awk {'print $2'}'
do
if [ $? -eq 0 ]
then
"put disable the queue"
else
"Do nothing"
fi
done
But, I don't know how to handle that "put disable the queue"
Would you mind to give me some hint, please?
Thanks a million!
Jan |
|
Back to top |
|
 |
jstefano |
Posted: Fri Sep 15, 2006 7:57 am Post subject: |
|
|
Apprentice
Joined: 13 Apr 2006 Posts: 48
|
vennela wrote: |
Quote: |
" if # of Messages in queue > 10 then do something" |
this can be done using performance events |
Hi there!
sorry for the late reply, I was out for few days.
Could you be so kind and let me know how to do that?
BTW, is that your real picture?
thanks
Jan |
|
Back to top |
|
 |
jefflowrey |
Posted: Fri Sep 15, 2006 7:59 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
You'll have to configure the queue manager and the queues to create performance events, and then write a program to recieve and react to those events.
There's an extensive amount of detail about this in the "Monitoring WebSphere MQ" manual. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
jstefano |
Posted: Fri Sep 15, 2006 8:45 am Post subject: |
|
|
Apprentice
Joined: 13 Apr 2006 Posts: 48
|
jefflowrey wrote: |
You'll have to configure the queue manager and the queues to create performance events, and then write a program to recieve and react to those events.
There's an extensive amount of detail about this in the "Monitoring WebSphere MQ" manual. |
Thanks a lot, Jeff, going to check it out!
Jan |
|
Back to top |
|
 |
|