Discussion:
Backout queue, threshold and the rulestable
Barton, Linda
2013-09-20 14:23:42 UTC
Permalink
Hi, I have a question about how the Backout Queue, Backout Threshold and the rulestable parms play together and how a message we have in the dead letter queue could possibly have a backout count of 365!

App queue - VK.PUB.CLAIMS... HardenGetBackout=HARDENBO
App backout queue VK.PUB.CLAIMS.BACKOUT....
App BOTHRESH(1)

System dead queue - QMGRNAME.DEAD.QUEUE
App dead queue - VK.DLQ.ALIAS

MQ_startup script has this entry: runmqdlq</util/mware/rulestable>/util/mware/mqdlq.log &

rulestable file:
REASON(MQRC_Q_FULL) ACTION(RETRY) RETRY(5)
REASON(MQRC_PUT_INHIBITED) ACTION(RETRY) RETRY(5)
DESTQ(VK*) +
ACTION(FWD) FWDQ(VK.DLQ.ALIAS) +
FWDQM(&DESTQM) HEADER(YES) PUTAUT(DEF)

DESTQ(VK*) +
ACTION(FWD) FWDQ(VK.DLQ.ALIAS) +
FWDQM(&REPLYQM) HEADER(YES) PUTAUT(DEF)

First, the application queue has a BOQNAME specified and a BOTHRESH of 1.
Second the rulestable has a retry count of 5 and takes the default interval of 60 for the retry interval for a queue full condition before it moves it from the DEAD queue to an application dead letter queue.

I would think that the first condition that would get hit is the BOQNAME and BOTHRESH of 1 - which moves a message off the application queue, to the backout queue specified on its definition. I would expect the BackoutCount to be 1 at this point for the failed MQGET, but for most of our messages in backout queues, the BackoutOutCount is 0. Not sure why that happens...

The application backout queue filled up so the message would be sent to the system DEAD.QUEUE.
Does the BackoutCount in the header get incremented for this action? There must be an MQGET from the app backout queue and a MQPUT to the DEAD queue. So the only time I would expect it to increment the Backoutcount is if it fails to put it to the DEAD queue. If that is true, a regular move to the DEAD queue does not increment the backout count. So BackoutCount would still be 1 at this point

Now I would expect the rulestable to kick in and if the message is on the system DEAD queue because the app queue is full, it would retry it 5 times at 60 second intervals and if it still fails, it would forward it to the queue we specified in the Action - the application dead letter queue - VK.DLQ.ALIAS. I would not expect the BackoutCount to be increased for this action, BackoutCount is still 1.

At some point, DEAD.QUEUE fills up. Now the GETS from the app backout queue will fail because it cannot put to the DEAD queue. This must be where the Backout count goes crazy. Does MQ go in to a holding pattern while the DEAD queue is full? I think I have seen it do that.

Meanwhile, the rulestable is moving the messages from the DEAD queue to the VK.DLQ.ALIAS local queue. I can only imagine the nightmare if the VK.DLQ.ALIAS local queue filled up and then the messages tried to go to the full DEAD queue. I imagine MQ would stop processing at this point.

So now the message tries to go to the full DEAD.QUEUE and the rulestable kicks in again. Does the BackoutCount get incremented every time it tries to move it to the VK.DLQ.ALIAS and fails? Would it go in an endless loop between the DEAD queue and the DLQ? When does it stop trying?



Linda Barton




To unsubscribe, write to LISTSERV-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org and,
in the message body (not the subject), write: SIGNOFF MQSERIES
Instructions for managing your mailing list subscription are provided in
the Listserv General Users Guide available at http://www.lsoft.com
Archive: http://listserv.meduniwien.ac.at/archives/mqser-l.html
Bruce Lerner
2013-09-21 18:44:17 UTC
Permalink
"App dead queue – VK.DLQ.ALIAS"

Is VK.DLQ.ALIAS a real local queue (QLocal)? Or is it really a QAlias. If
it's an alias, what real local queue TARGET?

To unsubscribe, write to LISTSERV-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org and,
in the message body (not the subject), write: SIGNOFF MQSERIES
Barton, Linda
2013-09-21 23:20:07 UTC
Permalink
VK.DLQ.ALIAS is the alias to an underlying local queue. VK.QMGRNAME.DLQ

Linda Barton

-----Original Message-----
From: MQSeries List [mailto:MQSERIES-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org] On Behalf Of Bruce Lerner
Sent: Saturday, September 21, 2013 2:44 PM
To: MQSERIES-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org
Subject: Re: Backout queue, threshold and the rulestable

"App dead queue - VK.DLQ.ALIAS"

Is VK.DLQ.ALIAS a real local queue (QLocal)? Or is it really a QAlias. If it's an alias, what real local queue TARGET?

To unsubscribe, write to LISTSERV-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org and, in the message body (not the subject), write: SIGNOFF MQSERIES Instructions for managing your mailing list subscription are provided in the Listserv General Users Guide available at http://www.lsoft.com
Archive: http://listserv.meduniwien.ac.at/archives/mqser-l.html

To unsubscribe, write to LISTSERV-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org and,
in the message body (not the subject), write: SIGNOFF MQSERIES
Bruce Lerner
2013-09-22 15:01:00 UTC
Permalink
I don't believe that the IBM-supplied dead-letter queue handler application
honors user-specified BackoutQueue attributes. The IBM-supplied source (in
'samples' directory) contains no such code.

Perhaps that is why the admonition to make the last rule one that moves the
message off the system dead-letter queue.

To unsubscribe, write to LISTSERV-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org and,
in the message body (not the subject), write: SIGNOFF MQSERIES
Bruce Lerner
2013-09-22 19:15:06 UTC
Permalink
Linda wrote: "...before it moves it from the DEAD queue to an application
dead letter queue."

I believe that you might have misunderstood how the pattern-matching rules
table works.

The dead-letter queue handler gets the first message in the DLQ. Then, it
looks at the first rule. If that rule matches the reason the message is in
the DLQ, the app attempts to apply that rule. If that rule doesn't match,
the dlq-handler looks at the next rule. Repeat for each rule.

If no rule matches, the message remains in the DLQ. You must code the last
rule to move messages that matched no other rules.

I also suspect that you believe that the queue manager takes action based on
BackoutRequeueQueueName, BackoutCount, BackoutThreshold, etc.. Not so. The
queue manager will increment the BackoutCount for the first message to be
delivered out of the queue, each time that message is MQBACKed out. It is
the responsibility of the application programmer to write code to deal with
backed out messages - to interrogate BackoutCount, compare it to
BackoutThreshold, then MQPUT it to the BackoutRequeueQueueName. This is
documented in the APR and APG manuals (and InfoCenter equivalents).

To unsubscribe, write to LISTSERV-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org and,
in the message body (not the subject), write: SIGNOFF MQSERIES
Barton, Linda
2013-09-23 17:04:11 UTC
Permalink
Thanks for the info. Looks like i have some reading to do. And some chgs to the rulestable. That makes sense about needing that last rule.
Sent from my iPhone

On Sep 22, 2013, at 3:15 PM, "Bruce Lerner" <brucelerner-JUB/***@public.gmane.org> wrote:

> Linda wrote: "...before it moves it from the DEAD queue to an application
> dead letter queue."
>
> I believe that you might have misunderstood how the pattern-matching rules
> table works.
>
> The dead-letter queue handler gets the first message in the DLQ. Then, it
> looks at the first rule. If that rule matches the reason the message is in
> the DLQ, the app attempts to apply that rule. If that rule doesn't match,
> the dlq-handler looks at the next rule. Repeat for each rule.
>
> If no rule matches, the message remains in the DLQ. You must code the last
> rule to move messages that matched no other rules.
>
> I also suspect that you believe that the queue manager takes action based on
> BackoutRequeueQueueName, BackoutCount, BackoutThreshold, etc.. Not so. The
> queue manager will increment the BackoutCount for the first message to be
> delivered out of the queue, each time that message is MQBACKed out. It is
> the responsibility of the application programmer to write code to deal with
> backed out messages - to interrogate BackoutCount, compare it to
> BackoutThreshold, then MQPUT it to the BackoutRequeueQueueName. This is
> documented in the APR and APG manuals (and InfoCenter equivalents).
>
> To unsubscribe, write to LISTSERV-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org and,
> in the message body (not the subject), write: SIGNOFF MQSERIES
> Instructions for managing your mailing list subscription are provided in
> the Listserv General Users Guide available at http://www.lsoft.com
> Archive: http://listserv.meduniwien.ac.at/archives/mqser-l.html

To unsubscribe, write to LISTSERV-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org and,
in the message body (not the subject), write: SIGNOFF MQSERIES
Barton, Linda
2013-09-23 17:05:36 UTC
Permalink
Are you at the capitalware mq conference?

Sent from my iPhone

On Sep 22, 2013, at 3:15 PM, "Bruce Lerner" <brucelerner-JUB/***@public.gmane.org> wrote:

> Linda wrote: "...before it moves it from the DEAD queue to an application
> dead letter queue."
>
> I believe that you might have misunderstood how the pattern-matching rules
> table works.
>
> The dead-letter queue handler gets the first message in the DLQ. Then, it
> looks at the first rule. If that rule matches the reason the message is in
> the DLQ, the app attempts to apply that rule. If that rule doesn't match,
> the dlq-handler looks at the next rule. Repeat for each rule.
>
> If no rule matches, the message remains in the DLQ. You must code the last
> rule to move messages that matched no other rules.
>
> I also suspect that you believe that the queue manager takes action based on
> BackoutRequeueQueueName, BackoutCount, BackoutThreshold, etc.. Not so. The
> queue manager will increment the BackoutCount for the first message to be
> delivered out of the queue, each time that message is MQBACKed out. It is
> the responsibility of the application programmer to write code to deal with
> backed out messages - to interrogate BackoutCount, compare it to
> BackoutThreshold, then MQPUT it to the BackoutRequeueQueueName. This is
> documented in the APR and APG manuals (and InfoCenter equivalents).
>
> To unsubscribe, write to LISTSERV-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org and,
> in the message body (not the subject), write: SIGNOFF MQSERIES
> Instructions for managing your mailing list subscription are provided in
> the Listserv General Users Guide available at http://www.lsoft.com
> Archive: http://listserv.meduniwien.ac.at/archives/mqser-l.html

To unsubscribe, write to LISTSERV-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org and,
in the message body (not the subject), write: SIGNOFF MQSERIES
Bruce Lerner
2013-09-23 20:53:33 UTC
Permalink
Hi, Linda.

Nope, I'm not at the conference. A bummer. I'm working this week - 5 days
in a row!

To unsubscribe, write to LISTSERV-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org and,
in the message body (not the subject), write: SIGNOFF MQSERIES
Roger Lacroix
2013-09-24 02:56:44 UTC
Permalink
Hi Bruce,

Here's what you're missing. :)
http://www.capitalware.biz/rl_blog/?p=2642

Regards,
Roger Lacroix
Capitalware Inc.

At 04:53 PM 9/23/13, you wrote:
>Hi, Linda.
>
>Nope, I'm not at the conference. A bummer. I'm working this week - 5 days
>in a row!
>
>To unsubscribe, write to LISTSERV-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org and,
>in the message body (not the subject), write: SIGNOFF MQSERIES
>Instructions for managing your mailing list subscription are provided in
>the Listserv General Users Guide available at http://www.lsoft.com
>Archive: http://listserv.meduniwien.ac.at/archives/mqser-l.html

To unsubscribe, write to LISTSERV-0lvw86wZMd9k/bWDasg6f+***@public.gmane.org and,
in the message body (not the subject), write: SIGNOFF MQSERIES
Loading...