Create triggers
Applies To: Windows Server 2003, Windows Server 2003 R2, Windows Server 2003 with SP1, Windows Server 2003 with SP2
To create triggers
Open Computer Management.
In the console tree, right-click Triggers.
Where?
- Computer Management/Services and Applications/Message Queuing/Triggers/Triggers
Point to New, and then click Trigger.
In Trigger name on the first page of the New Trigger dialog box, type a name for the new trigger.
If you want to specify a user-defined queue as the monitored queue, in Queue path name, type the path name of the queue with which the trigger will be associated in the ComputerName\QueueName syntax, or the .\QueueName syntax for the local computer. (Do not use format names.) Otherwise, click the name of an automatically created queue on your computer.
Click Peeking, Retrieval, or Transactional retrieval to specify the type of message processing.
Click the applicable check box to configure the trigger as enabled or disabled.
Click the applicable check box to configure the trigger as serialized or not serialized, and then click Next.
On the second page of the New Trigger dialog box, to attach an existing rule to the trigger, select a rule in the Rules list, and then click Attach
To remove a rule from a trigger, select a rule in the Attached Rules list, and then click Detach.
To change the order in which rules are tested for the triggers, click the Up and Down buttons.
When you have the list of attached rules that you want, click Finish.
Notes
To open Computer Management, right-click My Computer, and then click Manage.
Triggers are not installed by default during Message Queuing installation. For information on installing triggers, see Installing Message Queuing triggers.
This procedure can also be performed by opening the New Trigger dialog box from the Triggers folder under any monitored queue in the console tree as follows: right-click Triggers, point to New, and then click Trigger. In this case, the queue automatically becomes the monitored queue.
Regardless of where the creation of a trigger is initiated, all the triggers created on the local computer, which is called the trigger set, are listed in the details pane of the Computer Management snap-in when Triggers is selected in the console tree under the Triggers folder. By default, for each trigger, the following is displayed in the details pane:
Trigger name
Name of the monitored queue
Number of rules attached to the trigger
Whether the trigger is enabled
Whether the trigger is serialized
Message processing type
Before creating a trigger, verify that the account under which the Message Queuing Triggers service is running has been granted the Peek Message permission and the Receive Message permission for all existing queues that will be associated with triggers having the retrieval or transactional-retrieval processing type. For more information, see Related Topics.
After you type the name of a user queue to which the trigger will be associated in Queue path name, the existence of the queue is verified. If a queue with the name typed cannot be found, an error message appears.
Triggers can be serialized or nonserialized. A serialized trigger tests the conditions of all the rules associated with it on each message and performs all the applicable actions before moving on to the next message in the order in which the messages arrive. However, the throughput is lower than for nonserialized triggers because the messages are processed one at a time. Nonserialized triggers permit higher throughput but may fail to perform a given operation on the messages in the order in which they arrive. This occurs, for example, when multiple messages are processed simultaneously. If you create multiple triggers for a particular queue and at least one of them is serialized, all the triggers will behave as serialized triggers, even if they are not defined as serialized. Triggers with the transactional-retrieval processing type can only be serialized. If message processing order is significant, it is recommended that you use only a single trigger per queue and enable the serialized option, because the order of trigger firing is random with respect to their GUIDs.
By default, the Message Queuing Triggers service runs under the Network Service account. Note that when the Triggers service is running under the Network Service account, it does not interact with the desktop. If this functionality is required, you can configure the Triggers service to run under the Local System account and enable interaction with the desktop in Computer Management. For best security practice, do not change the default account to a less secure account unless absolutely necessary. The Triggers service must run under an account with administrator permissions.
Executable files that are invoked by triggers are invoked with the same security privileges as those assigned to the Triggers service.
After a trigger has been created, rules can be attached to it. For more information, see Related Topics.
When you delete a queue, the triggers associated with that queue are not deleted. If you later re-create a queue of the same name, any existing triggers will be used by this queue. However, this re-created queue will not be monitored by the Message Queuing Triggers service until the computer is restarted, or the associated triggers disabled, and then enabled again. For instructions on setting the enabled or disabled property for a trigger, see View or change properties of triggers and rules for triggers.
Information about functional differences
- Your server might function differently based on the version and edition of the operating system that is installed, your account permissions, and your menu settings. For more information, see Viewing Help on the Web.
See Also
Concepts
Administering Triggers
Triggers overview
Working with MMC console files