|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
  |
|
Trigger interval value |
View previous topic :: View next topic |
Author |
Message
|
J.Dawson |
Posted: Thu Feb 26, 2004 10:21 am Post subject: Trigger interval value |
|
|
Novice
Joined: 16 May 2001 Posts: 21 Location: Dallas, Texas
|
Regarding the trigger interval value of the queue manager, from the Application Reference Manual:
If TriggerInterval is set to a low value, and there is no application serving the application queue, trigger type FIRST might behave like trigger type EVERY (this depends on the rate that messages are being put onto the application queue, which in turn may depend on other system activity). This is because, if the trigger interval is very small, another trigger message is generated each time a message is put onto the application queue, even though the trigger type is FIRST, not EVERY. (Trigger type FIRST with a trigger interval of zero is equivalent to trigger type EVERY.)
If a unit of work is backed out (see “Trigger messages and units of work”) and the trigger interval has been set to a high value (or the default value), one trigger message is generated when the unit of work is backed out. However, if you have set the trigger interval to a low value or to zero (causing trigger type FIRST to behave like trigger type EVERY) many trigger messages can be generated. If the unit of work is backed out, all the trigger messages are still made available. The number of trigger messages generated depends on the trigger interval, the maximum number being reached when trigger interval has been set to zero.
Is this saying that after any kind of error, that might leave a message on the application queue, this interval will expire and then a trigger message will be place on the init queue?
What happens if the trigger is driven and no message is on the application queue? My thought is that the application will be driven and then will receive a 2033 and then terminate. Am I correct?
It also talks about if the value is set too low, then the 'first' trigger will act like the 'every' trigger. If my assumption is correct about when a trigger is driven when there is no application message, how can this happen?
What are some values for other shops?
Thanks,
John |
|
Back to top |
|
 |
PeterPotkay |
Posted: Thu Feb 26, 2004 10:43 am Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
Quote: |
Is this saying that after any kind of error, that might leave a message on the application queue, this interval will expire and then a trigger message will be place on the init queue?
|
No, the interval must pass AND another message must land on the queue.
Quote: |
What happens if the trigger is driven and no message is on the application queue?
|
This will only happen if an app puts a message on a queue under syncpoint, the trigger happens, and then the putting app backs out the put.
Or the committed message expires before the triggered app can get it.
Quote: |
It also talks about if the value is set too low, then the 'first' trigger will act like the 'every' trigger. If my assumption is correct about when a trigger is driven when there is no application message, how can this happen?
|
App1 puts a message to Queue1, and the trigger process starts. Before the triggered app has a chance to MQOPEN the triggered queue, the trigger interval passes AND another message is put by App1 to Queue1.
Quote: |
What are some values for other shops?
|
We use 300000 (5 minutes). _________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
J.Dawson |
Posted: Thu Feb 26, 2004 10:47 am Post subject: Trigger interval value |
|
|
Novice
Joined: 16 May 2001 Posts: 21 Location: Dallas, Texas
|
Peter,
Thanks for the reply. Has the trigger interval time cause any problems.
John |
|
Back to top |
|
 |
J.Dawson |
Posted: Thu Feb 26, 2004 10:59 am Post subject: |
|
|
Novice
Joined: 16 May 2001 Posts: 21 Location: Dallas, Texas
|
Peter,
Another question:
Quote:
Is this saying that after any kind of error, that might leave a message on the application queue, this interval will expire and then a trigger message will be place on the init queue?
No, the interval must pass AND another message must land on the queue.
Sorry, I'm confused here, let's say that a message arrives before the trigger interval expires. Because of the message arrival, the trigger will be driven and the application program will consume the latest message as well as the other messages. Is this correct? If so, how does the trigger interval plays any part in this?
Thanks,
John |
|
Back to top |
|
 |
PeterPotkay |
Posted: Thu Feb 26, 2004 3:19 pm Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
Quote: |
Has the trigger interval time cause any problems.
|
None, it can only help as long as you don't set it to low.
Quote: |
Sorry, I'm confused here, let's say that a message arrives before the trigger interval expires. Because of the message arrival, the trigger will be driven and the application program will consume the latest message as well as the other messages. Is this correct?
|
Yes.
Quote: |
If so, how does the trigger interval plays any part in this?
|
Message1 lands on the Trigger OnFirst queue. The queue is not open by an app, the depth goes from 0 to 1, all the other trigger conditions are true, and so the QM creates a trigger message to the INIT queue. The trigger monitor reads the trigger message and starts up the triggered app.
The triggered app cracks its knuckles, pulls up its sleeves and gets ready to work. But for whatever reason, it never MQOPENS the queue. Maybe the app needs to first connect to a database, and that database is temporarily down. So the app ends. Now the queue depth is greater than zero. The depth will never go from 0 to 1, so the Trigger OnFirst condition will not be met. As more messages land, nothing happens, and you get paged at 3 AM.
UNLESS, you set the Trigger Interval to 60000. This tells the QM that every minute, it should treat all Triggered OnFirst queues as having a depth of zero should another message be put to them. So even though the depth is going from 1 to 2, because the Trigger Interval has passed, the QM treats it as 0 to 1, and generates the Trigger Message. Hopefully now the temporary condition that prevented your app from MQOPENing the queue in the first place is gone, and life is good.
Of course if the temporary condition still exits, you will just fail again. _________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
|
|
  |
|
Page 1 of 1 |
|
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
|
|
|
|