A trigger is an automatic mechanism for implementing a specific action in response to a message event. Message Queuing Triggers is a service that allows you to associate the arrival of each incoming message at a queue with an appropriate response. The type of response depends on the contents of the message.

You can use Message Queuing Triggers to define business rules that can be invoked in response to such messages without any additional programming. Ordinarily, to provide such message-handling functionality, application developers would have to create a receiving application that invokes specific behavior on a per-message basis. By using Message Queuing Triggers, specific behavior can be invoked at the queue level. Application developers no longer need to write any infrastructure code to provide such message-handling functionality.

Each trigger is associated with a specific monitored queue on the local computer and is invoked by the Message Queuing Triggers service for every Message Queuing message arriving at that queue. A trigger is configured to obey one or more rules. A rule is defined by one or more conditions and an action.

The actions performed when a condition is true are expressed either in the form of:

  • An executable file and parameters (arguments).

  • A Component Object Model (COM) component, a method, and parameters.

You can also invoke other types of files by making them parameters of an executable file. For example, you can invoke an .msc file by specifying mmc.exe as the executable file and including the full path of the .msc file as an invocation parameter of the string literal type. You can specify one or more parameters to be passed for each action.

If your trigger invokes an executable file with command-line arguments, these arguments can be included as parameters of the string literal type. However, you must add a separate parameter for each command-line argument.

Triggers can be associated with queues located on the local computer and a remote computer.

This section shows you how to:


Table Of Contents