ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » General IBM MQ Support » Simple Triggering event is not working

Post new topic  Reply to topic
 Simple Triggering event is not working « View previous topic :: View next topic » 
Author Message
ghoshly
PostPosted: Thu May 19, 2016 12:19 pm    Post subject: Simple Triggering event is not working Reply with quote

Partisan

Joined: 10 Jan 2008
Posts: 327

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
View user's profile Send private message
mqjeff
PostPosted: Thu May 19, 2016 12:35 pm    Post subject: Reply with quote

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
View user's profile Send private message
exerk
PostPosted: Thu May 19, 2016 1:26 pm    Post subject: Reply with quote

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
View user's profile Send private message
hughson
PostPosted: Thu May 19, 2016 1:52 pm    Post subject: Reply with quote

Padawan

Joined: 09 May 2013
Posts: 1921
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
View user's profile Send private message Visit poster's website
ghoshly
PostPosted: Thu May 19, 2016 6:15 pm    Post subject: Reply with quote

Partisan

Joined: 10 Jan 2008
Posts: 327

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
View user's profile Send private message
ghoshly
PostPosted: Fri May 20, 2016 6:04 am    Post subject: Reply with quote

Partisan

Joined: 10 Jan 2008
Posts: 327

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
View user's profile Send private message
ghoshly
PostPosted: Fri May 20, 2016 11:15 am    Post subject: Reply with quote

Partisan

Joined: 10 Jan 2008
Posts: 327

Hello,

How to reset the trigger for the queue after processing messages other than ALTER QLOCAL script?
Back to top
View user's profile Send private message
Vitor
PostPosted: Fri May 20, 2016 11:33 am    Post subject: Reply with quote

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
View user's profile Send private message
bruce2359
PostPosted: Fri May 20, 2016 12:46 pm    Post subject: Reply with quote

Poobah

Joined: 05 Jan 2008
Posts: 9415
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
View user's profile Send private message
hughson
PostPosted: Fri May 20, 2016 12:59 pm    Post subject: Reply with quote

Padawan

Joined: 09 May 2013
Posts: 1921
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
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » General IBM MQ Support » Simple Triggering event is not working
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.