Author |
Message
|
KAKOZ |
Posted: Wed Mar 10, 2004 8:52 am Post subject: triggering EVERY and IMS transaction? |
|
|
Voyager
Joined: 26 Jan 2004 Posts: 90 Location: FRANCE
|
Hi,
when defining triggering EVERY on a queue to start an IMS transaction
is each message arriving on the queue going to generate the IMS transaction?
Jack |
|
Back to top |
|
 |
EddieA |
Posted: Wed Mar 10, 2004 9:18 am Post subject: |
|
|
 Jedi
Joined: 28 Jun 2001 Posts: 2453 Location: Los Angeles
|
For every message arriving, yes (under normal circumstances), an IMS transaction will be started. What happens then, depends on the logic in your application. Does the application only read one message and then end. Does it keep reading looking for more messages that might have arrived since it started. Can it cope with being started and not finding a message.
BTW. Do *NOT* rely on this to happen if triggering is disabled and then restarted for any reason, or when the Queue Manager is restarted. In these conditions, only one trigger message is genererated, no matter how many messages are on the Queue.
Cheers, _________________ Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0 |
|
Back to top |
|
 |
PeterPotkay |
Posted: Wed Mar 10, 2004 2:36 pm Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
If one IMS message for every MQ message is what you want (I am not agreeing or disagreeing with this concept), the way to do this safely is to set Trigger Type to First, and have your IMS app get only one MQ message. When it MQCLOSES the queue, it will be retriggered if there is another message on the MQ queue. _________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
kman |
Posted: Thu Mar 11, 2004 11:44 pm Post subject: |
|
|
Partisan
Joined: 21 Jan 2003 Posts: 309 Location: Kuala Lumpur, Malaysia
|
If the trigger interval is long, then there won't be any trigger message generated when the next message arrive. When trigger interval is reached, the depth is already passed more than 1. In this case, would it be that no more trigger message is generated, causing no more trigger event?
If so, then trigger first then won't trigger IMS transaction on every message arrival. So the need to set it to EVERY.
Correct me if I am wrong, Peter. |
|
Back to top |
|
 |
pgorak |
Posted: Fri Mar 12, 2004 1:05 am Post subject: |
|
|
 Disciple
Joined: 15 Jul 2002 Posts: 158 Location: Cracow, Poland
|
Quote: |
When it MQCLOSES the queue, it will be retriggered if there is another message on the MQ queue.
|
Provided it is the only application that keeps the queue opened.
Piotr _________________ ***
IBM Certified Solution Developer WebSphere MQ 5.3 |
|
Back to top |
|
 |
PeterPotkay |
Posted: Fri Mar 12, 2004 5:55 am Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
Piotr point is correct. We have to assume that only 1 app has the queue open if we are dealing with Trigger Type First.
kman, lets say one message lands on the queue, kicking off the app, which will only read 1 message and end. Before it has a chance to MQCLOSE that queue on its way to ending, one or more messages land. When the MQCLOSE actually occurs, the QM will see that the only application that has the queue open is closing it, but there are still messages behind. So the QM generates another trigger message (just one).
Once the app finally completes the MQDISC, AND ends, the trigger monitor will consume that one trigger message, and immediatly start up the process again, where the cycle repeats until the queue is drained.
Trigger Interval has nothing to do with this cycle.
We have one app that is IMS that has this requirement due to some old code that they don't want to change. They understand the overhead of constantly retriggering. _________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
LuisFer |
Posted: Fri Mar 12, 2004 12:50 pm Post subject: |
|
|
 Partisan
Joined: 17 Aug 2002 Posts: 302
|
Why don't use the OTMA brigde? It's more efficient than Trigger. |
|
Back to top |
|
 |
kman |
Posted: Sun Mar 14, 2004 7:19 pm Post subject: |
|
|
Partisan
Joined: 21 Jan 2003 Posts: 309 Location: Kuala Lumpur, Malaysia
|
Peter,
If the application on its way to closing (not using OTMA ), and there is two more messages that landed in the queue, - only one more trigger is generated. If this is always the case.. then there is a chance that one or two messages is left in the queue .. if the application did not processed everything in the queue. It is ok, only if the transaction consumes all the messages.
If it only consumes one messages then closes.. that 's trouble. |
|
Back to top |
|
 |
PeterPotkay |
Posted: Sun Mar 14, 2004 8:13 pm Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
Quote: |
If it only consumes one messages then closes.. that 's trouble.
|
There is no trouble. Another trigger message will be generated by the QM as soon as the app issues an MQCLOSE on a Triggered OnFirst queue if the queue depth is greater than 0.
It is safe to only consume one message in this case, although understand that you must incur the overhead of multiple retriggers during high volume. _________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
KAKOZ |
Posted: Wed Mar 17, 2004 6:36 am Post subject: |
|
|
Voyager
Joined: 26 Jan 2004 Posts: 90 Location: FRANCE
|
Peter,
in case of triggering FIRST starting an IMS transaction are you sure that:
- as soon as the IMS transaction MQCLOSEs the queue and finishes, if the queue is not empty the queue manager generates another trigger message even if the triger interval is not reached?
i never read that in the documentation
- in that case what about the use of the trigger interval?
Jack |
|
Back to top |
|
 |
EddieA |
Posted: Wed Mar 17, 2004 7:44 am Post subject: |
|
|
 Jedi
Joined: 28 Jun 2001 Posts: 2453 Location: Los Angeles
|
Application Programming Guide. Chapter 14, Conditions for a Trigger Event, point 12.
If the application that is triggered ends, for some reason, before it opens (and so doesn't close) the Queue, the above will not happen. There will still be a message on the queue, and so trigger first will never happen, without using trigger interval.
Cheers, _________________ Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0 |
|
Back to top |
|
 |
Heinz57 |
Posted: Wed Mar 17, 2004 8:30 am Post subject: |
|
|
 Apprentice
Joined: 21 Jan 2004 Posts: 26 Location: Syracuse, NY
|
Triggering on first will fire when a depth goes from 0 to 1. If you trigger first based on priority, it will fire when a message with that priority goes from depth of 0 to 1. |
|
Back to top |
|
 |
PeterPotkay |
Posted: Wed Mar 17, 2004 5:22 pm Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
There are 5 or 6 other cases where a Trigger On First queue will fire, even if the queues has 2 (or 2 million messages) already on it.
The depth going from 0 to 1 is just one way, but obviously the most common way. _________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
KAKOZ |
Posted: Wed Mar 17, 2004 10:53 pm Post subject: |
|
|
Voyager
Joined: 26 Jan 2004 Posts: 90 Location: FRANCE
|
thanks guys to remind me chapter 14 of Appl Programming Guide:
all explanations are there
cheers
Jack |
|
Back to top |
|
 |
|