Author |
Message
|
KAK |
Posted: Tue Aug 27, 2013 1:07 am Post subject: Dead letter queue handler not found........... |
|
|
Novice
Joined: 24 May 2013 Posts: 12
|
I tried to do this way i.e. invoking dlq handler as server service object.
DEFINE SERVICE(dlqhandler) +
SERVTYPE(SERVER) +
CONTROL(MANUAL) +
STARTCMD('C:\websphere\DLQ\dlqhandler.bat') +
DESCR('dead letter queue handler as server service') +
STARTARG('DEADQ IBMQMR < C:\websphere\DLQ\RULETBL.RUL') +
STDOUT('C:\IBM\WebSphere\MQ\Log.txt') +
STDERR('C:\IBM\WebSphere\MQ\Err.txt') +
REPLACE
where RULETEST.RUL is rule table as an argument to dlqhandler process which contains
Code:
INPUTQ('DEADQ') INPUTQM('RTEST') RETRYINT(45) WAIT(YES)
REASON(MQRC_Q_FULL) ACTION(FWD) FWDQ(DLQX) FWDQM(RTEST)
Contents of dlqhandler.bat
cd "C:\Program Files\IBM\WebSphere MQ\bin"
runmqdlq %1 %2 %3 %4
when i am displaying the dlqhandler ,it displays "Dead letter queue handler not found"
Can anybody plz tell me where i did a mistake[/code] |
|
Back to top |
|
 |
Tibor |
Posted: Tue Aug 27, 2013 2:05 am Post subject: |
|
|
 Grand Master
Joined: 20 May 2001 Posts: 1033 Location: Hungary
|
Using a redirection in STARTCMD is not a good idea. If you have already had a script for executing a command, you can place the input arguments and redirecting into that. |
|
Back to top |
|
 |
exerk |
Posted: Tue Aug 27, 2013 2:38 am Post subject: |
|
|
 Jedi Council
Joined: 02 Nov 2006 Posts: 6339
|
@KAK,
Which version of WMQ are you using?
Below is a sample configuration (done on a v7.0.1 installation):
Code: |
DEFINE SERVICE ('DEAD.LETTER.HANDLER') +
DESCR('Dead-letter queue automated message handler') +
STARTCMD('C:\DLQH\mqdlqh.bat') +
STARTARG('DEAD.QUEUE +QMNAME+ < C:\DLQH\dlqh.rul') +
STDOUT('C:\DLQH\+QMNAME+_DLQ_stdout.txt') +
STDERR('C:\DLQH\+QMNAME+_DLQ_stderr.txt') +
CONTROL(STARTONLY) +
SERVTYPE(SERVER) +
REPLACE |
Batch file content:
Code: |
runmqdlq.exe %1 %2 %3 |
Rules file content:
Code: |
* CUSTOM RULE TABLE *
* Start Control Data
RETRYINT(10) WAIT(YES)
* End Control Data
* Start Rules
REASON(MQRC_NOT_AUTHORIZED) ACTION(FWD) FWDQ(SECURITY.CHECK.QUEUE)
REASON(MQRC_Q_FULL) ACTION(RETRY) RETRY(5)
REASON(MQRC_PUT_INHIBITED) ACTION(RETRY) RETRY(5)
REASON(*) ACTION(FWD) FWDQ(MQRC.REVIEW.QUEUE)
* End Rules |
The queue manager place-holder (+QMNAME+) makes it more 'transportable' across all your queue managers.
@Tibor,
What's your issue with a redirect? _________________ It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys. |
|
Back to top |
|
 |
Tibor |
Posted: Tue Aug 27, 2013 2:44 am Post subject: |
|
|
 Grand Master
Joined: 20 May 2001 Posts: 1033 Location: Hungary
|
@exerk: there is no issue on my side - I don't really like it in that place  |
|
Back to top |
|
 |
exerk |
Posted: Tue Aug 27, 2013 2:47 am Post subject: |
|
|
 Jedi Council
Joined: 02 Nov 2006 Posts: 6339
|
Tibor wrote: |
@exerk: there is no issue on my side - I don't really like it in that place  |
For the benefit of the OP, so he/she/it can compare and contrast, please post how you'd set up the service. Thank you.
...and me, I'm curious now! _________________ It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys. |
|
Back to top |
|
 |
Tibor |
Posted: Tue Aug 27, 2013 3:28 am Post subject: |
|
|
 Grand Master
Joined: 20 May 2001 Posts: 1033 Location: Hungary
|
For the original post (not tested, because I have no qmgr on Windows platform just now):
- defining service:
Code: |
DEFINE SERVICE(DLQHANDLER) +
SERVTYPE(SERVER) +
CONTROL(MANUAL) +
STARTCMD('C:\websphere\DLQ\dlqhandler.cmd') +
DESCR('dead letter queue handler as server service') +
STARTARG('') +
STDOUT('C:\IBM\WebSphere\MQ\Log.txt') +
STDERR('C:\IBM\WebSphere\MQ\Err.txt') +
REPLACE |
- CMD script:
Code: |
SET IN=C:\WebSphere\dlqrules.txt
SET OUT=C:\WebSphere\MQ\Log.txt
SET ERR=C:\WebSphere\MQ\Err.txt
"C:\Program Files\IBM\WebSphere MQ\bin\runmqdlq.exe" <%IN% >%OUT% 2>%ERR%
|
- DLQ script: not changed
In case of that, you can try your script directly, and if it is working correctly, there will be no problem as an MQ service.
Back to KAK's post: there was a confusing in filenames (RULETEST.RUL vs RULETBL.RUL) |
|
Back to top |
|
 |
|