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 » triggering EVERY and IMS transaction?

Post new topic  Reply to topic
 triggering EVERY and IMS transaction? « View previous topic :: View next topic » 
Author Message
KAKOZ
PostPosted: Wed Mar 10, 2004 8:52 am    Post subject: triggering EVERY and IMS transaction? Reply with quote

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
View user's profile Send private message
EddieA
PostPosted: Wed Mar 10, 2004 9:18 am    Post subject: Reply with quote

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
View user's profile Send private message
PeterPotkay
PostPosted: Wed Mar 10, 2004 2:36 pm    Post subject: Reply with quote

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
View user's profile Send private message
kman
PostPosted: Thu Mar 11, 2004 11:44 pm    Post subject: Reply with quote

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
View user's profile Send private message Yahoo Messenger
pgorak
PostPosted: Fri Mar 12, 2004 1:05 am    Post subject: Reply with quote

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
View user's profile Send private message
PeterPotkay
PostPosted: Fri Mar 12, 2004 5:55 am    Post subject: Reply with quote

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
View user's profile Send private message
LuisFer
PostPosted: Fri Mar 12, 2004 12:50 pm    Post subject: Reply with quote

Partisan

Joined: 17 Aug 2002
Posts: 302

Why don't use the OTMA brigde? It's more efficient than Trigger.
Back to top
View user's profile Send private message
kman
PostPosted: Sun Mar 14, 2004 7:19 pm    Post subject: Reply with quote

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
View user's profile Send private message Yahoo Messenger
PeterPotkay
PostPosted: Sun Mar 14, 2004 8:13 pm    Post subject: Reply with quote

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
View user's profile Send private message
KAKOZ
PostPosted: Wed Mar 17, 2004 6:36 am    Post subject: Reply with quote

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
View user's profile Send private message
EddieA
PostPosted: Wed Mar 17, 2004 7:44 am    Post subject: Reply with quote

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
View user's profile Send private message
Heinz57
PostPosted: Wed Mar 17, 2004 8:30 am    Post subject: Reply with quote

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
View user's profile Send private message
PeterPotkay
PostPosted: Wed Mar 17, 2004 5:22 pm    Post subject: Reply with quote

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
View user's profile Send private message
KAKOZ
PostPosted: Wed Mar 17, 2004 10:53 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » General IBM MQ Support » triggering EVERY and IMS transaction?
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.