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 API Support » Triggering with trigtype set as first

Post new topic  Reply to topic
 Triggering with trigtype set as first « View previous topic :: View next topic » 
Author Message
pmehta
PostPosted: Tue Jul 29, 2003 10:33 pm    Post subject: Triggering with trigtype set as first Reply with quote

Novice

Joined: 29 Jul 2003
Posts: 13

Hi All,

I am having a problem with trigtype first.

The scenario is whenever the message come in a queue a C rpogram is triggered . In the program MQBEGIN is called to begin the unit of work, then MQGET is called to get the message from the queue and after the completion of the whole processing MQCMIT is called. In case of some failure in the processing MQBACK is called to rollback the unit of work.

Now the problem is when I do a rollback the program is getting triggered once again which actually speaking should not happen. The trigtype is set to first.

Please help we with this.

Thanks
PMehta
Back to top
View user's profile Send private message
bob_buxton
PostPosted: Wed Jul 30, 2003 1:25 am    Post subject: Reply with quote

Master

Joined: 23 Aug 2001
Posts: 266
Location: England

The MQBACK will cause the message you got to be rolled back to the queue and be eligible for being gotten by your program again.
To avoid a failure loop you should check the message backout count and if it is excessive (greater than backout threshold) either discard the message or requeue it to the backout requeue queue or DLQ.

Issuing the MQBACK should not itself cause another trigger message to be generated but if you, as part of your failure clean up, closed the input queue then another trigger message would be generated.
_________________
Bob Buxton
Ex-Websphere MQ Development
Back to top
View user's profile Send private message
oz1ccg
PostPosted: Wed Jul 30, 2003 2:42 am    Post subject: Reply with quote

Yatiri

Joined: 10 Feb 2002
Posts: 628
Location: Denmark

Hmm,

Are you keeping the queue open for input ?

Because WMQ will generate a trigger msg when qdepth goes from 0->1 and the queue is NOT open for INPUT. General rule.

MQ will generate an additional trigger msg when you put a msg, and qdepth > 1, if the queue is NOT open for INPUT and TRIGINT has expired.

I've spend some time investigating this sort of mis-designs.

just my $0.02
_________________
Regards, Jørgen
Home of BlockIP2, the last free MQ Security exit ver. 3.00
Cert. on WMQ, WBIMB, SWIFT.
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
pmehta
PostPosted: Wed Jul 30, 2003 2:56 am    Post subject: Reply with quote

Novice

Joined: 29 Jul 2003
Posts: 13

Thanks Bob,

But the requirenment is that we should not use DLQ. Instead we should stops the processing as soon as some error comes. The message should not be deleted from the queue.
Back to top
View user's profile Send private message
bob_buxton
PostPosted: Wed Jul 30, 2003 2:59 am    Post subject: Reply with quote

Master

Joined: 23 Aug 2001
Posts: 266
Location: England

APG: Conditions for a trigger event

12 The only application serving a queue issues an MQCLOSE call, for a TriggerType of MQTT_FIRST or MQTT_DEPTH, and there is at least:
One (MQTT_FIRST)
or
TriggerDepth (MQTT_DEPTH)
messages on the queue of sufficient priority (condition 2), and conditions 6 through 10 are also satisfied.

This is to allow for a queue server that issues an MQGET call, finds the queue empty, and so ends; however, in the interval between the MQGET and the MQCLOSE calls, one or more messages arrive.

Notes:

If the program serving the application queue does not want to retrieve all the messages, this can cause a closed loop. Each time the program closes the queue, the queue manager creates another trigger message which causes the trigger monitor to start the server program again.

If the program serving the application queue backs out its get request (or if the program abends) before it closes the queue, the same happens.

To prevent such a loop occurring, you could use the BackoutCount field of MQMD to detect messages that are repeatedly backed out. For more information, see Messages that are backed out.
_________________
Bob Buxton
Ex-Websphere MQ Development
Back to top
View user's profile Send private message
pmehta
PostPosted: Wed Jul 30, 2003 3:02 am    Post subject: Reply with quote

Novice

Joined: 29 Jul 2003
Posts: 13

Yes the queue is opened for shared input.

And the process is triggered second time only when the wriong message is coming at the position other than the first. If the wrong message comes at the first postion then the process doesn't trigger twice.
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 API Support » Triggering with trigtype set as first
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.