Author |
Message
|
ghoshly |
Posted: Thu May 19, 2016 12:19 pm Post subject: Simple Triggering event is not working |
|
|
Partisan
Joined: 10 Jan 2008 Posts: 333
|
Hello,
I am trying to enable a triggering event, but somehow I am unable to get the trigger message in the initiation queue. Would you please help to identify if I am missing something basic and obvious?
***** Define Initiation Queue *****
define qlocal(TEST.TRIGGER.INIT.Q)
***** Define application specific queue with triggering event *****
define qlocal(TEST.TRIGGER.Q) TRIGTYPE(DEPTH) TRIGMPRI(0) TRIGDPTH(5) TRIGDATA('clear qlocal(TEST.TRIGGER.Q) | runmqsc QMESB01') INITQ(TEST.TRIGGER.INIT.Q)
I thought process definition is not mandatory at least to get trigger message in the initiation queue. Even I tried with process definition.
***** Define a process *****
define process(self.clear.queue) APPLICID('/u/tghosh/temp_unix/clear.qlocal.ksh') APPLTYPE(UNIX) DESCR('Process to clear self queue after certain q depth')
ALTER QLOCAL(TEST.TRIGGER.Q) PROCESS(self.clear.queue)
I put multiple messages into the application queue (multiples of 5) but trigger event's not getting generated. tried to execute trigger monitor..
**** Execute trigger monitor *****
runmqtrm -m QMESB01 -q TEST.TRIGGER.INIT.Q
AIX 7.1 WMQ 7.5.0.5 |
|
Back to top |
|
 |
mqjeff |
Posted: Thu May 19, 2016 12:35 pm Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
The trigger will only be generated when the queue goes from 4 messages to 5.
Not "every five messages".
Can you see the initq open for input?
Does anything get reported to the stdout of runmqtrm ? _________________ chmod -R ugo-wx / |
|
Back to top |
|
 |
exerk |
Posted: Thu May 19, 2016 1:26 pm Post subject: |
|
|
 Jedi Council
Joined: 02 Nov 2006 Posts: 6339
|
The trigger monitor needs to be running before messages go into the queue on which triggering is set, and if you trigger on depth the trigger should be reset by the application servicing the queue, after the queue has been cleared. _________________ 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 |
|
 |
hughson |
Posted: Thu May 19, 2016 1:52 pm Post subject: |
|
|
 Padawan
Joined: 09 May 2013 Posts: 1959 Location: Bay of Plenty, New Zealand
|
Please remember that you cannot test you triggering setup and check your triggering definitions by looking for the messages on the INITQ manually. If your trigger monitor is not running, and thus the INITQ is not open, a trigger message will not be created.
Cheers
Morag _________________ Morag Hughson @MoragHughson
IBM MQ Technical Education Specialist
Get your IBM MQ training here!
MQGem Software |
|
Back to top |
|
 |
ghoshly |
Posted: Thu May 19, 2016 6:15 pm Post subject: |
|
|
Partisan
Joined: 10 Jan 2008 Posts: 333
|
Thank you seniors.... I had wrong idea ... I thought it would be for every 5 message and I would be able to see message in INIT queue..
When I ran command to start trigger monitor, it had some output.
I'll try again and update my findings.
Thanks for your valuable responses. |
|
Back to top |
|
 |
ghoshly |
Posted: Fri May 20, 2016 6:04 am Post subject: |
|
|
Partisan
Joined: 10 Jan 2008 Posts: 333
|
Hello,
I re-created the queue after deleting and I can see IPPROCS for INITQ as 1. Here goes the output for trigger monitor which I can see is picking up. Would you please guide about the trigger data format to be used if I want to pass parameters to a common process?
define qlocal(TEST.TRIGGER.Q) TRIGGER TRIGTYPE(DEPTH) TRIGMPRI(0) TRIGDPTH(5) TRIGDATA('echo "clear qlocal(TEST.TRIGGER.Q)" | runmqsc QMESB01') INITQ(TEST.TRIGGER.INIT.Q)
alter qlocal(TEST.TRIGGER.Q) PROCESS(self.clear.queue)
display qstatus(TEST.TRIGGER.INIT.Q)
3 : display qstatus(TEST.TRIGGER.INIT.Q)
AMQ8450: Display queue status details.
QUEUE(TEST.TRIGGER.INIT.Q) TYPE(QUEUE)
CURDEPTH(0) IPPROCS(1)
LGETDATE( ) LGETTIME( )
LPUTDATE( ) LPUTTIME( )
MEDIALOG(S0000182.LOG) MONQ(OFF)
MSGAGE( ) OPPROCS(0)
QTIME( , ) UNCOM(NO)
runmqtrm -m QMESB01 -q TEST.TRIGGER.INIT.Q
5724-H72 (C) Copyright IBM Corp. 1994, 2011. ALL RIGHTS RESERVED.
05/20/16 09:41:56 : WebSphere MQ trigger monitor started.
__________________________________________________
05/20/16 09:41:56 : Waiting for a trigger message
/u/tghosh/temp_unix/clear.qlocal.ksh 'TMC 2TEST.TRIGGER.Q SELF.CLEAR.QUEUE echo "clear qlocal(TEST.TRIGGER.Q)" | runmqsc QMESB01 /u/tghosh/temp_unix/clear.qlocal.ksh QMESB01 '
5724-H72 (C) Copyright IBM Corp. 1994, 2011. ALL RIGHTS RESERVED.
Starting MQSC for queue manager QMESB01.
1 : clear qlocal(TEST.TRIGGER.Q)
AMQ8148: WebSphere MQ object in use.
One MQSC command read.
No commands have a syntax error.
One valid MQSC command could not be processed.
05/20/16 09:43:50 : End of application trigger.
__________________________________________________
05/20/16 09:43:50 : Waiting for a trigger message |
|
Back to top |
|
 |
ghoshly |
Posted: Fri May 20, 2016 11:15 am Post subject: |
|
|
Partisan
Joined: 10 Jan 2008 Posts: 333
|
Hello,
How to reset the trigger for the queue after processing messages other than ALTER QLOCAL script? |
|
Back to top |
|
 |
Vitor |
Posted: Fri May 20, 2016 11:33 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
ghoshly wrote: |
How to reset the trigger for the queue after processing messages other than ALTER QLOCAL script? |
Empty it.
The trigger will fire again the next time the depth goes from 4 to 5 (in your example). _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
bruce2359 |
Posted: Fri May 20, 2016 12:46 pm Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 Location: US: west coast, almost. Otherwise, enroute.
|
With TRIGTYPE(DEPTH), triggering is turned off when TRIGDEPTH( ) value is reached. It is up to the application to MQSET triggering back on for the queue. _________________ 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 |
|
 |
hughson |
Posted: Fri May 20, 2016 12:59 pm Post subject: |
|
|
 Padawan
Joined: 09 May 2013 Posts: 1959 Location: Bay of Plenty, New Zealand
|
bruce2359 wrote: |
With TRIGTYPE(DEPTH), triggering is turned off when TRIGDEPTH( ) value is reached. It is up to the application to MQSET triggering back on for the queue. |
 _________________ Morag Hughson @MoragHughson
IBM MQ Technical Education Specialist
Get your IBM MQ training here!
MQGem Software |
|
Back to top |
|
 |
|