Author |
Message
|
Scooter |
Posted: Thu Feb 19, 2004 10:04 am Post subject: Dead-Letter handler question |
|
|
 Apprentice
Joined: 01 May 2003 Posts: 35 Location: Dallas, Tx
|
If I wished to use the dead-letter handler "runmqdlq" to re-send "MQRC_Q_FULL" to there destination queue. What are is the best way to execute the handler, Trigger or Service? Are there any pros or cons to either. If triggering is used what trigger type would you recommend? |
|
Back to top |
|
 |
EddieA |
Posted: Thu Feb 19, 2004 10:25 am Post subject: |
|
|
 Jedi
Joined: 28 Jun 2001 Posts: 2453 Location: Los Angeles
|
Trigger probably won't work. Message can't be delivered because the Queue is full. Message goes to DLQ. Handler gets triggered and sends message to original queue. Queue is (still) full, so delivery fails. Message remains on DLQ. Handler ends. MQ generates another trigger because there's a message on the Queue when application ends. Handler gets triggered. Do I need to continue.
Cheers, _________________ Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0 |
|
Back to top |
|
 |
Scooter |
Posted: Thu Feb 19, 2004 12:38 pm Post subject: |
|
|
 Apprentice
Joined: 01 May 2003 Posts: 35 Location: Dallas, Tx
|
Ok, lets say we are going to use it as a service. Would you recommend it to be a Windows Service or a MQ Custom Service? |
|
Back to top |
|
 |
EddieA |
Posted: Thu Feb 19, 2004 1:00 pm Post subject: |
|
|
 Jedi
Joined: 28 Jun 2001 Posts: 2453 Location: Los Angeles
|
As a service, it will be running all the time. Same problem.
Cheers, _________________ Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0 |
|
Back to top |
|
 |
Scooter |
Posted: Thu Feb 19, 2004 1:42 pm Post subject: |
|
|
 Apprentice
Joined: 01 May 2003 Posts: 35 Location: Dallas, Tx
|
Eddie, I'm not following you on this or I'm not explaining it every well. My test show that "runmqdlq" will not produce a duplicate message in the DeadLetter queue if you have it retry all messages in the DeadLetter queue with the status of "MQRC_Q_FULL". If the destination queue is full the message is left in the DeadLetter queue, if the retry is successful the message is removed from the DeadLetter queue. |
|
Back to top |
|
 |
EddieA |
Posted: Thu Feb 19, 2004 3:23 pm Post subject: |
|
|
 Jedi
Joined: 28 Jun 2001 Posts: 2453 Location: Los Angeles
|
I'm not saying that any "duplicate" messages will be produced. There won't be, because the handler does everything under UOWs.
I guess I was trying to answer the question assuming that the queue that's full would stay full for a while. You would keep trying to re-process the failed messages, based on the retry interval, until the queue depth eventually did start to drop. Ok, not a big overhead, but nevertheless, an overhead.
Basically, you would have to balance how long you expect the handler to have to be running, and waiting, for the queue level to drop to process the failed messages. With the triggered version, depending how you set the RETRYINT and WAIT parameters, you may end up with the handler being triggered a number of times in succession. For the trigger type, only First would make any sense.
For a service, you would have to have it running continually, attempting the retry of the messages every RETYINT time. That's assuming that you can get it to run as a service. It reads it's control information from stdin.
Does that make more sense.
Cheers, _________________ Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0 |
|
Back to top |
|
 |
Michael Dag |
Posted: Thu Feb 19, 2004 3:27 pm Post subject: |
|
|
 Jedi Knight
Joined: 13 Jun 2002 Posts: 2607 Location: The Netherlands (Amsterdam)
|
I think what Eddie is trying to tell you is that when you trigger the dlqhandler or run the it as a service,
the queue you are writing to is still FULL and causing a flood of retries which all fail...
Best action I guess if you find a QFULL message is to handle this first and from that action trigger the dlqhandler to reprocess any 'left' messages.
Michael |
|
Back to top |
|
 |
Scooter |
Posted: Fri Feb 20, 2004 5:20 am Post subject: |
|
|
 Apprentice
Joined: 01 May 2003 Posts: 35 Location: Dallas, Tx
|
Thanks guys...That was the same idea I was thinking would happen, but plan to handle with the RETRYINT and RETRY options. We don't plan on the queue to stay full for long. I have a monitor program that will alert us when the queue is getting full. The DeadLetter queue gives us a buffer in case the queue does fill up. I plan on setting the handler to only run for a specific amount of time and then have it stop and then restart. This should allow it to retry messages that failed more then once. Of course this will require me to write my own handler or program to launch the IBM handler. |
|
Back to top |
|
 |
techno |
Posted: Fri Feb 20, 2004 9:00 am Post subject: |
|
|
Chevalier
Joined: 22 Jan 2003 Posts: 429
|
Are you using any tools or you have written a monitoring app? |
|
Back to top |
|
 |
Scooter |
Posted: Fri Feb 20, 2004 12:00 pm Post subject: |
|
|
 Apprentice
Joined: 01 May 2003 Posts: 35 Location: Dallas, Tx
|
We wrote our own monitoring tool, it is customized to monitor specific queues in our system that we deem critical. This monitor tool is only used on Window environment where all are critical queues exist. |
|
Back to top |
|
 |
EddieA |
Posted: Sat Feb 21, 2004 1:54 pm Post subject: |
|
|
 Jedi
Joined: 28 Jun 2001 Posts: 2453 Location: Los Angeles
|
Quote: |
Of course this will require me to write my own handler or program to launch the IBM handler. |
Or just 'modify' the IBM one to meet your needs. Just paint the wheel a different colour.
Cheers, _________________ Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0 |
|
Back to top |
|
 |
Scooter |
Posted: Mon Feb 23, 2004 5:55 am Post subject: |
|
|
 Apprentice
Joined: 01 May 2003 Posts: 35 Location: Dallas, Tx
|
Extractly what I did.  |
|
Back to top |
|
 |
|