Author |
Message
|
BCBS |
Posted: Wed Aug 23, 2006 7:51 am Post subject: Design - MQ - Alerts - Solution/best practice |
|
|
 Apprentice
Joined: 12 Jul 2006 Posts: 37
|
Pardon me if similar issue is discussed here already.
I need to send alerts to different developers based on the error message content in a message queue. Say some application like MB (msg flow) will write the error msgs to a queue called ABOQ. The message will have information about whom to alert (for example, its an XML msg, and has a tag NAME with values of the person to get alerted like BUSH / KERRY / CLINTON etc..
I can write a msg flow to parse that msg and write it to some flat file, which then I can set some TIVOLI monitoring on that file to send the alert. BUT, I am not supposed get the messages out of the queue (NO destructive read).
Any ideas? Java / MDB .... ?
Thanks in advance
BCBS _________________ _________________________________ |
|
Back to top |
|
 |
dgolding |
Posted: Wed Aug 23, 2006 8:13 am Post subject: |
|
|
 Yatiri
Joined: 16 May 2001 Posts: 668 Location: Switzerland
|
Modify the sample program "amqsget" to do a browse rather than a destructive GET (checking that the buffer size is big enough - 80 bytes I believe from memory) and run that, sending the output to a file that Tivoli can analyse |
|
Back to top |
|
 |
wschutz |
Posted: Wed Aug 23, 2006 8:29 am Post subject: |
|
|
 Jedi Knight
Joined: 02 Jun 2005 Posts: 3316 Location: IBM (retired)
|
If you don't do a destructuve read:
(1) when DO the messages get removed from the queue?
(2) what prevents you from processing the same message multiple times (for example, at restart of your browsing appl) ? _________________ -wayne |
|
Back to top |
|
 |
dgolding |
Posted: Wed Aug 23, 2006 8:39 am Post subject: |
|
|
 Yatiri
Joined: 16 May 2001 Posts: 668 Location: Switzerland
|
When we use Tivoli here, it reads a text log file from the last position it left off from. So, if you repeatedly dump the queue to a text file (overwriting the previous one) so it gets bigger as the queue grows, the TEC adapter widget thingie should position to the previous EOF on the last read and scan from there.......at least, that's how I would think it could be done...... |
|
Back to top |
|
 |
BCBS |
Posted: Wed Aug 23, 2006 8:48 am Post subject: |
|
|
 Apprentice
Joined: 12 Jul 2006 Posts: 37
|
wschutz wrote: |
If you don't do a destructuve read:
(1) when DO the messages get removed from the queue?
(2) what prevents you from processing the same message multiple times (for example, at restart of your browsing appl) ? |
(1) We will get them off that queue after a week.
(2) Looking solution for this only.
dgolding:
Tivoli is maged by a seperate team and all they want from us is to write it to that file. If I use something like amqsget, I need to have a trigger setup for that, as the messages can arrive anytime on that queue, and as soon as a message comes this program should read it and write to that file. or any other choices like Java program running as a cron job, constantly looking in the queue for any new messages? _________________ _________________________________ |
|
Back to top |
|
 |
dgolding |
Posted: Wed Aug 23, 2006 8:59 am Post subject: |
|
|
 Yatiri
Joined: 16 May 2001 Posts: 668 Location: Switzerland
|
I would do a cron job then periodically dumped the queue and wrote to the file. The trouble with trigger type EVERY is if you get multiple messages in one transaction; and of course you can't have trigger type FIRST as you only clear down the queue once a week! |
|
Back to top |
|
 |
wschutz |
Posted: Wed Aug 23, 2006 9:07 am Post subject: |
|
|
 Jedi Knight
Joined: 02 Jun 2005 Posts: 3316 Location: IBM (retired)
|
Do you have the flexibilty to setup TWO queues (for each presidential candidate)? The first queue triggers your modified amqsget application to destructively read the message, write it to Tivoli and then place it on the second queue. This way, you can use triggering and you wouldn't duplicate the Tivoli messages..... _________________ -wayne |
|
Back to top |
|
 |
BCBS |
Posted: Wed Aug 23, 2006 11:07 am Post subject: |
|
|
 Apprentice
Joined: 12 Jul 2006 Posts: 37
|
Wayne:
wschutz wrote: |
Do you have the flexibilty to setup TWO queues (for each presidential candidate)? |
No flexibility now. But we have to go with two queues if there is no other good solution.
dgolding:
I might end up on a cron job.
Once again, thanks all for valuable inputs. _________________ _________________________________ |
|
Back to top |
|
 |
|