Posted: Sun Aug 31, 2003 11:58 pm Post subject: Triggering
Apprentice
Joined: 19 Aug 2003 Posts: 33
Hi,
I have a VB program that accepts commandline paramaters and then does some processing.
It accepts the Queue manager and queue name and then extracts all possible messages from
that queue.
I need to run this program so that it can process a message on arrival, the MQ
trigger executes the program.
Question 1
----------
Must the program browse the queue and process all the messages on the queue or can I
pass a messageId to the program via a command line paramater? If so how? (I'm using
MQ Series 5.2 on Windows 2000)
Question 2
----------
How can I pass other paramaters to the program via the command line? These would
be static paramaters that I type in when creating the trigger.
The trigger monitor does not inspect the message that actually kicked off the trigger condition. The queue manager sees that a trigger condition is present, and then places the trigger message on the init queue. This queue manager generated trigger message is the extent of the info that is present to the trigger monitor, and thus the triggered application.
So the aswer to your first question is no, your triggered app could not learn the messageID of a message on the queue. Triggered apps should always be coded to process any and all messages on a queue when started.
There are 2 fields (EnvData and UserData) in the Process Defintion that allow you to specify static data that you want placed in the trigger message. The trigger monitor can then pass these fields into the triggered app via the MQTMC structure.
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