Author |
Message
|
shashivarungupta |
Posted: Thu Oct 13, 2011 9:06 am Post subject: DLQ Behaviour When DLQ Handler is being triggered ! |
|
|
 Grand Master
Joined: 24 Feb 2009 Posts: 1343 Location: Floating in space on a round rock.
|
Hi,
As we know DLQ is a Qlocal and has properties to set trigger ON , on it to kick off some process/program/utility.
I was trying to trigger the DLQ Handler 'whenever' (trigger type every) message is coming in to the DLQ of a queue manager !
Following is the DEADQ on a queue manager which triggers a process (proc1) which calls 'runmqdlq < testrule.rul'.
Code: |
DISPLAY QLOCAL(DEADQ)
2 : DISPLAY QLOCAL(DEADQ)
AMQ8409: Display Queue details.
QUEUE(DEADQ) TYPE(QLOCAL)
ACCTQ(QMGR) ALTDATE(2011-10-13)
ALTTIME(01.56.48) BOQNAME( )
BOTHRESH(0) CLUSNL( )
CLUSTER( ) CLWLPRTY(0)
CLWLRANK(0) CLWLUSEQ(QMGR)
CRDATE(2011-10-12) CRTIME(21.43.54)
CURDEPTH(0) DEFBIND(OPEN)
DEFPRTY(0) DEFPSIST(NO)
DEFPRESP(SYNC) DEFREADA(NO)
DEFSOPT(SHARED) DEFTYPE(PREDEFINED)
DESCR(WebSphere MQ Default Dead Letter Queue)
DISTL(NO) GET(ENABLED)
HARDENBO
INITQ(SYSTEM.DEFAULT.INITIATION.QUEUE)
IPPROCS(1) MAXDEPTH(999999999)
MAXMSGL(4194304) MONQ(QMGR)
MSGDLVSQ(PRIORITY) TRIGGER
NPMCLASS(NORMAL) OPPROCS(0)
PROCESS(proc1) PUT(ENABLED)
PROPCTL(COMPAT) QDEPTHHI(80)
QDEPTHLO(20) QDPHIEV(DISABLED)
QDPLOEV(DISABLED) QDPMAXEV(ENABLED)
QSVCIEV(NONE) QSVCINT(999999999)
RETINTVL(999999999) SCOPE(QMGR)
SHARE STATQ(QMGR)
TRIGDATA( ) TRIGDPTH(1)
TRIGMPRI(0) TRIGTYPE(EVERY)
USAGE(NORMAL)
|
(Assume trigger monitor is active on initQ)
When I mention 'runmqdlq < testrule.rul' in a xyz.bat file (file name xyz.bat with its absolute path is in 'Application ID' of process definition of 'proc1') , it works fine, that means msg comes to DLQ..it gets triggered..trigger msg goes to initQ.. trigger msg gets processed from initQ..which calls xyz.bat.. inturn kicks off runmqdlq..it does the some action on that msg(as per rule table). Perfectly fine !
BUT things start to fail when I do not mention any *.bat file Or any absolute path of the process/utility in the application Id field. If I do write simply 'runmqdlq < testrule.rul' in the application id (of proc1) then it starts to fail and gets in loop and keeps on sending the msgs to DLQ with error 'MQFB_APPL_CANNOT_BE_STARTED'.
I understand why it gets in loop.. because trigger is set for type 'every'.
But question is why it does not work when 'runmqdlq < testrule.rul' is being mentioned in the application id field.
I also have noticed that its behaviour is unpredictable., which works and does not work at times for runmqdlq.
MQ version v7.0.1.3, Window xp.
 _________________ *Life will beat you down, you need to decide to fight back or leave it. |
|
Back to top |
|
 |
mqjeff |
Posted: Thu Oct 13, 2011 9:10 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
What program is it that is creating a command line of "runmqdlq < testrule.rul'"? (Hint, this is a leading question..)
What command shell is in use when "runmqdlq < testrule.rul'" is evaluated?
What determined what command shell was in use when "runmqdlq < testrule.rul'" is evaluated? |
|
Back to top |
|
 |
bruce2359 |
Posted: Thu Oct 13, 2011 10:01 am Post subject: Re: DLQ Behaviour When DLQ Handler is being triggered ! |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9470 Location: US: west coast, almost. Otherwise, enroute.
|
shashivarungupta wrote: |
But question is why it does not work when 'runmqdlq < testrule.rul' is being mentioned in the application id field. |
Try specifying the absolute path and executable in the PROCESS object.
Also, don't specify TRIGTYPE(EVERY). Rather, specify it as FIRST; then specify in the rules file how long to wait for more dead-letter messages. _________________ 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 |
|
 |
mqjeff |
Posted: Thu Oct 13, 2011 10:05 am Post subject: Re: DLQ Behaviour When DLQ Handler is being triggered ! |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
bruce2359 wrote: |
shashivarungupta wrote: |
But question is why it does not work when 'runmqdlq < testrule.rul' is being mentioned in the application id field. |
Try specifying the absolute path and executable in the PROCESS object. |
shashivarungupta did try that, and it worked.
shashivarungupta is now trying to understand why it was necessary.
It's not necessary, mind you. |
|
Back to top |
|
 |
bruce2359 |
Posted: Thu Oct 13, 2011 10:16 am Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9470 Location: US: west coast, almost. Otherwise, enroute.
|
Why? If the file is not visible in the shell default path, then the absolute path must be specified in the PROCESS definition. This is basic o/s. _________________ 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 |
|
 |
shashivarungupta |
Posted: Thu Oct 13, 2011 10:23 am Post subject: Re: DLQ Behaviour When DLQ Handler is being triggered ! |
|
|
 Grand Master
Joined: 24 Feb 2009 Posts: 1343 Location: Floating in space on a round rock.
|
bruce2359 wrote: |
shashivarungupta wrote: |
But question is why it does not work when 'runmqdlq < testrule.rul' is being mentioned in the application id field. |
Try specifying the absolute path and executable in the PROCESS object.
Also, don't specify TRIGTYPE(EVERY). Rather, specify it as FIRST; then specify in the rules file how long to wait for more dead-letter messages. |
I have already tried with absolute path and executable (as said xyz.bat) in the process object And that works perfectly fine !!
I have tried using FIRST trigger type and with wait interval in the rule table. Which worked perfectly fine.
I was trying to find out, when 'runmqdlq < testrule.rul' is being mentioned directly in the application id field, it tries to search runmqdlq in the bin folder (by default) and then it fails, why !
mqjeff wrote: |
What command shell is in use when "runmqdlq < testrule.rul'" is evaluated? |
as I have mentioned that I tested this scenario on windows, so it was DOS command prompt not the shell.
Or I'm not sure that I have understood the questions correctly. _________________ *Life will beat you down, you need to decide to fight back or leave it. |
|
Back to top |
|
 |
mqjeff |
Posted: Thu Oct 13, 2011 10:27 am Post subject: Re: DLQ Behaviour When DLQ Handler is being triggered ! |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
shashivarungupta wrote: |
I was trying to find out, when 'runmqdlq < testrule.rul' is being mentioned directly in the application id field, it tries to search runmqdlq in the bin folder (by default) and then it fails, why ! |
This is basic o/s.
shashivarungupta wrote: |
mqjeff wrote: |
What command shell is in use when "runmqdlq < testrule.rul'" is evaluated? |
as I have mentioned that I tested this scenario on windows, so it was DOS command prompt not the shell.
Or I'm not sure that I have understood the questions correctly. |
You haven't, not really.
All command shells on windows are going to be DOS.
Not all DOS command shells have the same configuration. Your question has to do with the particular configuration of the particular command shell that is trying to run the runmqdlq program.
I am attempting to lead you to understand what is creating that command shell, and where it is getting it's configuration from.
But, again, as bruce says, this is basic O/S. So you just need to focus a little bit and I'm sure you'll get it. |
|
Back to top |
|
 |
shashivarungupta |
Posted: Thu Oct 13, 2011 12:04 pm Post subject: Re: DLQ Behaviour When DLQ Handler is being triggered ! |
|
|
 Grand Master
Joined: 24 Feb 2009 Posts: 1343 Location: Floating in space on a round rock.
|
mqjeff wrote: |
shashivarungupta wrote: |
I was trying to find out, when 'runmqdlq < testrule.rul' is being mentioned directly in the application id field, it tries to search runmqdlq in the bin folder (by default) and then it fails, why ! |
This is basic o/s. |
I believe, by that you mean, that when we put 'runmqdlq < testrule.rul' in .bat file (or executable file) in process object, then it's shell is being generated by command.com to interpret it. BUT when we mention 'runmqdlq < testrule.rul' in the appli id field directly then it does not find the way to invoke the interpreter.
mqjeff wrote: |
shashivarungupta wrote: |
mqjeff wrote: |
What command shell is in use when "runmqdlq < testrule.rul'" is evaluated? |
as I have mentioned that I tested this scenario on windows, so it was DOS command prompt not the shell.
Or I'm not sure that I have understood the questions correctly. |
You haven't, not really.
All command shells on windows are going to be DOS.
Not all DOS command shells have the same configuration. Your question has to do with the particular configuration of the particular command shell that is trying to run the runmqdlq program.
I am attempting to lead you to understand what is creating that command shell, and where it is getting it's configuration from.
But, again, as bruce says, this is basic O/S. So you just need to focus a little bit and I'm sure you'll get it. |
command.com (I hope)  _________________ *Life will beat you down, you need to decide to fight back or leave it. |
|
Back to top |
|
 |
aditya.aggarwal |
Posted: Thu Oct 13, 2011 12:15 pm Post subject: |
|
|
 Master
Joined: 13 Jan 2009 Posts: 252
|
Quote: |
mqjeff wrote:
shashivarungupta wrote:
I was trying to find out, when 'runmqdlq < testrule.rul' is being mentioned directly in the application id field, it tries to search runmqdlq in the bin folder (by default) and then it fails, why !
This is basic o/s.
I believe, by that you mean, that when we put 'runmqdlq < testrule.rul' in .bat file (or executable file) in process object, then it's shell is being generated by command.com to interpret it. BUT when we mention 'runmqdlq < testrule.rul' in the appli id field directly then it does not find the way to invoke the interpreter.
mqjeff wrote:
shashivarungupta wrote:
mqjeff wrote:
What command shell is in use when "runmqdlq < testrule.rul'" is evaluated?
as I have mentioned that I tested this scenario on windows, so it was DOS command prompt not the shell.
Or I'm not sure that I have understood the questions correctly.
You haven't, not really.
All command shells on windows are going to be DOS.
Not all DOS command shells have the same configuration. Your question has to do with the particular configuration of the particular command shell that is trying to run the runmqdlq program.
I am attempting to lead you to understand what is creating that command shell, and where it is getting it's configuration from.
But, again, as bruce says, this is basic O/S. So you just need to focus a little bit and I'm sure you'll get it.
command.com (I hope) |
I think this is not only the reason...if that is the situation then you can invoke runmqdlq by giving its absolute path in appl id field of process definition...
try to invoke amqsput, amqsget amqsreq |
|
Back to top |
|
 |
mqjeff |
Posted: Thu Oct 13, 2011 12:25 pm Post subject: Re: DLQ Behaviour When DLQ Handler is being triggered ! |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
shashivarungupta wrote: |
mqjeff wrote: |
shashivarungupta wrote: |
I was trying to find out, when 'runmqdlq < testrule.rul' is being mentioned directly in the application id field, it tries to search runmqdlq in the bin folder (by default) and then it fails, why ! |
This is basic o/s. |
I believe, by that you mean, that when we put 'runmqdlq < testrule.rul' in .bat file (or executable file) in process object, then it's shell is being generated by command.com to interpret it. BUT when we mention 'runmqdlq < testrule.rul' in the appli id field directly then it does not find the way to invoke the interpreter. |
No.
All triggered applications are started by the trigger monitor. That is what I mean. |
|
Back to top |
|
 |
shashivarungupta |
Posted: Thu Oct 13, 2011 12:31 pm Post subject: |
|
|
 Grand Master
Joined: 24 Feb 2009 Posts: 1343 Location: Floating in space on a round rock.
|
actually.. I saw very interesting thing here..
when I simply write 'runmqdlq' in the appli id field of process object and on the other hand I make a msg to go to DLQ ..THEN ..interpreter gets invoked to handle 'runmqdlq' !! (as shown below)
Code: |
C:\Documents and Settings\Administrator>runmqtrm -m RTEST -q SYSTEM.DEFAULT.INITIATION.QUEUE
5724-H72 (C) Copyright IBM Corp. 1994, 2009. ALL RIGHTS RESERVED.
10/14/2011 01:47:00: WebSphere MQ trigger monitor started.
__________________________________________________
10/14/2011 01:47:00: Waiting for a trigger message
"runmqdlq "TMC 2DEADQ proc1
runmqdlq
RTEST " "
|
Then why it does not work for 'runmqdlq < ruletable.rul' !!!!!
In this case of failure, trigger msg stuck in initQ !!
On the other hand , take the another program/utility say 'amqsget DEADQ RTEST' and do mention it in the appli. id field of process obj. then it gets invoked with 2046 mqrc..but it gets invoked.
Code: |
C:\Documents and Settings\Administrator>runmqtrm -m RTEST -q SYSTEM.DEFAULT.INITIATION.QUEUE
5724-H72 (C) Copyright IBM Corp. 1994, 2009. ALL RIGHTS RESERVED.
10/14/2011 01:55:57: WebSphere MQ trigger monitor started.
__________________________________________________
10/14/2011 01:55:57: Waiting for a trigger message
"amqsget DEADQ RTEST "TMC 2DEADQ proc1
amqsget DEADQ RTEST
RTEST " "
Sample AMQSGET0 start
open options are 0
MQOPEN ended with reason code 2046
unable to open queue for input
Sample AMQSGET0 end
10/14/2011 01:56:10: End of application trigger.
__________________________________________________
10/14/2011 01:56:10: Waiting for a trigger message
|
 _________________ *Life will beat you down, you need to decide to fight back or leave it. |
|
Back to top |
|
 |
bruce2359 |
Posted: Thu Oct 13, 2011 12:44 pm Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9470 Location: US: west coast, almost. Otherwise, enroute.
|
Did you look up RaasonCode 2046? What does it mean? Why did you execute amqsget?
Let's stick with the original issue: dead-letter handler (not) being triggered.
Please post the dead-letter QUEUE definition here.
Please post the PROCESS object definition here.
Please post the dead-letter handler script (file) here. _________________ 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 |
|
 |
mqjeff |
Posted: Thu Oct 13, 2011 12:51 pm Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
You have indicated that you manually executed the trigger monitor from a shell started by a logged in user.
Is this the same way that the trigger monitor normally gets started? |
|
Back to top |
|
 |
shashivarungupta |
Posted: Thu Oct 13, 2011 1:02 pm Post subject: |
|
|
 Grand Master
Joined: 24 Feb 2009 Posts: 1343 Location: Floating in space on a round rock.
|
aditya.aggarwal wrote: |
I think this is not only the reason.. |
what else could be the reason(s) then ?
bruce2359 wrote: |
Why did you execute amqsget? |
I was being asked to test one of the other utilities in the similar way, by aditya.aggarwal !!
bruce2359 wrote: |
Let's stick with the original issue: dead-letter handler (not) being triggered. |
I'm trying to !
bruce2359 wrote: |
Please post the dead-letter QUEUE definition here. |
I did ! (first post of this topic).
bruce2359 wrote: |
Please post the PROCESS object definition here. |
(when proc1 has 'runmqdlq < RULETEST.RUL') :
DISPLAY PROCESS('proc1') all
4 : DISPLAY PROCESS('proc1') all
AMQ8407: Display Process details.
PROCESS(proc1) APPLTYPE(WINDOWSNT)
APPLICID(runmqdlq < RULETEST.RUL) ENVRDATA( )
USERDATA( ) DESCR( )
ALTDATE(2011-10-14) ALTTIME(02.26.43)
bruce2359 wrote: |
Please post the dead-letter handler script (file) here. |
INPUTQ('DEADQ') INPUTQM('RTEST') RETRYINT(45) WAIT(YES)
REASON(MQRC_Q_FULL) ACTION(FWD) FWDQ(DLQX) FWDQM(RTEST)
(with leading blank line at the EOF) _________________ *Life will beat you down, you need to decide to fight back or leave it. |
|
Back to top |
|
 |
bruce2359 |
Posted: Thu Oct 13, 2011 1:09 pm Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9470 Location: US: west coast, almost. Otherwise, enroute.
|
The trigger monitor runs in a different shell - one that appears to have the WMQ bin folder in its execution path.
In your shell, does your path contain the WMQ bin folder (the one that contains runmqdlg)? _________________ 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 |
|
 |
|