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 » triggertype problem !!

Post new topic  Reply to topic
 triggertype problem !! « View previous topic :: View next topic » 
Author Message
ashly
PostPosted: Tue Jan 09, 2007 4:18 am    Post subject: triggertype problem !! Reply with quote

Newbie

Joined: 10 Oct 2006
Posts: 8

Hi all,

we have websphere 5.3/linux for our app.We have come across the following scenario today.


*)The triggertype is set to 'FIRST' for queue 'Q'
*)The TRIGGER on the Q is turned off.
*)we have put 10 messages into the Q.
*)The TRIGGER is turned on.

*) ideally as I understand only one init message should be generated - for the first message in the Q.
*)But to our amazement we find the trigger program is fired 10 times!!! [indicating that there are 10 init messages]

Does anyone have any clue on what is happening?
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Tue Jan 09, 2007 4:21 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

Make sure your triggered app services the queue until empty and does not disconnect from the queue after each message....
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
ashly
PostPosted: Tue Jan 09, 2007 4:31 am    Post subject: Reply with quote

Newbie

Joined: 10 Oct 2006
Posts: 8

yes we are doing the same.

*)the Triggered app is a Java Pgm
*) it runs, until all messages are consumed and then disonnect from MQ.


The problem is the program is getting triggered again [due to init messages?]
while my understanding is that only one init message should be generated and in that scenario the program will not be triggered again.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Tue Jan 09, 2007 4:35 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

ashly wrote:
yes we are doing the same.

*)the Triggered app is a Java Pgm
*) it runs, until all messages are consumed and then disonnect from MQ.


The problem is the program is getting triggered again [due to init messages?]
while my understanding is that only one init message should be generated and in that scenario the program will not be triggered again.

Looks like you misunderstood. If the program disconnects from the QUEUE between messages, the qmgr considers the queue as no longer being serviced. This may lead to the generation of a trigger message.

Enjoy
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
jefflowrey
PostPosted: Tue Jan 09, 2007 4:40 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

What FJ is saying is that your code needs to be
1) MQCONN
2) MQOPEN
3) Loop
4) MQGET
5) While not 2033
6) MQCLOSE
7) MQDISC

If you are doing anything else, like
1) MQCONN
2) Loop
3) MQOPEN
4) MQGET
5) MQCLOSE
6) While not 2033
7) MQDISC

Then you'll get a new trigger message at every MQCLOSE, potentially.

I'd suggest you start the trigger monitor in some manner such that you can watch the stdout of it, to see what it thinks is going on.

Or go back and re-read the trigger conditions page and go through each one (all 14 or so) and match it with your setup until you find where you have done something differently.

The odds of this being the result of a bug in MQ are very small.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
exerk
PostPosted: Tue Jan 09, 2007 5:26 am    Post subject: Reply with quote

Jedi Council

Joined: 02 Nov 2006
Posts: 6339

It may also be worth checking that the TRIGINT attribute has not been set to a ridiculously small interval, unlikely but it removes one more thing from the equation.
_________________
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
ashly
PostPosted: Tue Jan 09, 2007 7:42 pm    Post subject: Reply with quote

Newbie

Joined: 10 Oct 2006
Posts: 8

Thanks Guys!

we used JMS api to connect and receive the message.

*)in the 'get()' we had a new QueueReceiver obj created every time and we used to close the receiver obj every time.
*) Removed the above portion.

==> the code is noe working fine.

Thanks.
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 » triggertype problem !!
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.