Creating triggers

Applies To: Windows Server 2003, Windows Server 2003 R2, Windows Server 2003 with SP1, Windows Server 2003 with SP2

Creating triggers

Triggers are created on the local computer in Triggers under the Message Queuing Triggers folder in the console tree of the Computer Management snap-in or in Triggers under any queue that is already monitoring a trigger by right-clicking Triggers, pointing to New, and then clicking Trigger. In the latter case, the queue selected automatically becomes the monitored queue. On the first page of the New Trigger dialog box, you must type a name for the new trigger in Trigger name. The monitored queue can be a user-defined queue registered in Active Directory, whose path name must be typed in Queue path name, or one of the automatically created queues on the local computer, which is selected by clicking the applicable button. Regardless of where the creation of a trigger is initiated, every trigger created on the local computer is displayed in the Computer Management snap-in under Triggers and under the applicable monitored queue. You then select the message processing type, and finally you indicate whether the trigger will be enabled and whether it will be serialized. For more information on the message processing type, enabled triggers, and serialized triggers, see Triggers overview.

By default, the Message Queuing Triggers service runs under the Network Service account. For heightened security, you can change the default Triggers service account to a more secure setting. You can also specify a less secure account for the Triggers service. The account used must be able to access the queues with which triggers are associated. Note that executable files invoked by triggers are invoked with the same security privileges as those assigned to the Triggers service. If your rule invokes a COM component, make sure that it can be successfully invoked from the security context used by the Triggers service, is properly registered, and has suitable dependencies. For more information, see Triggers overview.

You can attach an existing rule to the new trigger by selecting a rule and then associating it with the trigger. The order in which the rules are tested (their priorities) can be specified. For more information, see Create triggers.

Before creating a trigger, verify that the account under which the Message Queuing Triggers service is running has been granted the Peek Message permission for all existing queues that will be associated with triggers. For more information, see Set permissions for computer and queue objects.

Managing triggers and queues

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.