Page 1 of 1

Need clarification MQ TRIGINIT and Trigger type

PostPosted: Wed May 12, 2010 7:26 am
by ram23bal
Hi all,

Iam new to MQ and have a query in MQ with trigger.

Our queue is defined with the parameter's
Trigger Type - 'First'
Queue Depth - '1'

In queue manager TRIGINIT is set a 180000.

Does it mean that trigger will be initiated ony after 180 secs interval only?

please have the below case as an example

10:00:00 – Let’s assume we have three transactions placing messages in request queue.
10:00:01 – first message arrives to reply queue1. At this time trigger will get invoked.
Let’s assume it takes 3 seconds.
10:00:02 – Another message arrives to reply queue1. This time trigger won’t be invoked.
10:00:04 – Trigger won’t be invoked even now as trigger interval hasn’t expired (this trigger interval is picked as QMGR attribute and not at queue level as you mentioned). So the next trigger will be invoked after 180 seconds
10:03:01 – If another message is received will it wait for the previous queue expiration interval?

Re: Need clarification MQ TRIGINIT and Trigger type

PostPosted: Wed May 12, 2010 7:22 pm
by Bill Dennis
It would be a good idea to have the triggered application get with wait for some interval before ending. This prevents excessive triggering.

IIRC, a new trigger is set after the interval expires, messages are in the queue and no application has the queue open for GET. This allows a failed trigger application to be restarted.

Re: Need clarification MQ TRIGINIT and Trigger type

PostPosted: Fri May 14, 2010 12:09 pm
by ram23bal
thanks Bill,

If the message is triggered and processed will it wait the TRIGINIT time to process the next message...?
Any Idea on this..?

Re: Need clarification MQ TRIGINIT and Trigger type

PostPosted: Fri May 14, 2010 8:31 pm
by Bill Dennis
The application should do another GET to see if more messages exist on the queue before ending.

I believe that if the application ends while another message exists on the queue, you will wait for the TRIGINIT to trigger the application again.