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 » IBM MQ Installation/Configuration Support » Trigger rule ?

Post new topic  Reply to topic
 Trigger rule ? « View previous topic :: View next topic » 
Author Message
[EG]Slayer
PostPosted: Wed Aug 26, 2009 10:59 pm    Post subject: Trigger rule ? Reply with quote

Novice

Joined: 01 Aug 2008
Posts: 16

Hi,
I've a question about how the trigger works with MQSeries in a specific case.

I've defined a triggered local queue (trigger first). the program attached to this queue create files in a file system with the messages. Before getting a message from the queue, the program check the target file system to be sure there is enough space available on the disk. If it detects that there is not enough space available (<5%), the program ends with a return code 0 (Even if there's one or more messages left on the queue. As the queue is configured with Trigger First, the Queue Manager trigger interval was set to 2 minutes.
My problem is that the Queue Manager generate immediately a new message in the initiation queue when the program end when there's at least one message in the triggered queue (and now it's my log file which is increasing a lot ... )

Is that normal ?

Thanks for your help
Back to top
View user's profile Send private message
exerk
PostPosted: Thu Aug 27, 2009 12:02 am    Post subject: Reply with quote

Jedi Council

Joined: 02 Nov 2006
Posts: 6339

When the application closes the queue, the trigger is reset, and as the queue is not empty, the trigger conditions are met, and the rest you know. The TRIGINT is only invoked should the trigger not be reset, e.g. when an application abends without correctly closing the queue.
_________________
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
[EG]Slayer
PostPosted: Thu Aug 27, 2009 12:23 am    Post subject: Reply with quote

Novice

Joined: 01 Aug 2008
Posts: 16

ok, understood
thanks
Back to top
View user's profile Send private message
Mr Butcher
PostPosted: Thu Aug 27, 2009 2:06 am    Post subject: Reply with quote

Padawan

Joined: 23 May 2005
Posts: 1716

Quote:
When the application closes the queue, the trigger is reset, and as the queue is not empty, the trigger conditions are met


mhhh not in this case, as trigger first has passed and because there is a message on the queue this condition will never occur again. thats why it was implemented in mqseres code that a new trigger is created for a non empty trigger type first queue, when the last consuming process closes the queue.
so this is why you get trigger messaged immediate. you open the queue, then you check the filesystem. if full, you close the queue nonempty and a new trigger message is generated.
to get out of that loop check the filesystem before opening the queue. but in that case trigger first has passed and (normally) no new trigger message is created so your application will never be started again.

now TRIGINT comes into account. MQ will create an additional trigger message if a message arrives on the queue, and the time since the last trigger message was generated is greater then the time specified in the TRIGINT attribute of the queuemanager. notice, you need a message to arrive to get a new trigger (except on z/OS, here a trigger is generated after that TRIGINT time without a message needed to arrive)


check with the MQV7 application programming guide manual, special cases for trigger first on page 207
_________________
Regards, Butcher
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 » IBM MQ Installation/Configuration Support » Trigger rule ?
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.