MSMQ Triggers

Server-only: This tool is included in the Windows 2000 Server Resource Kit only.


MSMQ Triggers is Message Queuing application that allows you to associate incoming messages in a queue with functionality in a COM component or standalone .exe. As such, business rules can be invoked in response to such messages without any additional programming.

MSMQ Triggers works with Message Queuing for Microsoft® Windows® 2000 and MSMQ 1.0 for Microsoft® Windows NT® version 4.0.

MSMQ Triggers Concepts

Triggers are associated with specific queues on a computer and are invoked every time a Message Queuing message arrives at such queues. A trigger is comprised of one or more rules. These rules are defined by actions that will be invoked when all conditions associated with a rule are true.

A trigger is an automatic action taken in response to a message event. In the context of MSMQ Triggers, an event is defined as one or more conditions being satisfied with respect to a message arriving at a queue. The collection of all triggers on a particular computer is called the trigger set.

A condition is a test that is applied when a message arrives at a monitored queue. The condition can test for a property of a message only. A condition is always paired with an action.

An action is an executable behavior that is taken when a condition is true. An action can be expressed as an executable and argument list; or, a COM component, method, and argument list. Arguments are also called parameters.

A rule is an action-condition pair. A rule describes an action that will be taken when a specific condition is true. The collection of all rules (for all triggers) on a particular computer is called the rule set. A default rule handler, IMSMQRuleHandler, is used to test the condition and implement the action for a rule. This is the only supported rule handler.

An action is an executable behavior that is taken when a condition is true. An action can be expressed as an executable and argument list; or, a COM component, method, and argument list. Arguments are also called parameters.

A rule is an action-condition pair. A rule describes an action that will be taken when a specific condition is true. The collection of all rules (for all triggers) on a particular computer is called the rule set. A default rule handler, IMSMQRuleHandler, is used to test the condition and implement the action for a rule. This is the only supported rule handler.

The MSMQ Triggers Service reads messages from a monitored queue, that is, the service looks at such messages. Messages are not removed from queues by this service. It should be noted that another Message Queuing application may open the queue and remove messages before the MSMQ Triggers Service can looks at the queue.

 

note-icon

Note

On Windows NT 4.0, a trigger cannot be associated with a private queue located on a remote computer.

Why Use MSMQ Triggers?

To provide message-handling functionality currently, applications developers must create a receiving application that invokes specific behavior on a per-message basis.

By using MSMQ Triggers, specific behavior can be invoked at a queue level. Application developers no longer need to write any infrastructure code to provide such message-handling functionality.

MSMQ Triggers Components

MSMQ Triggers consists of three separate programs. The first, Trigserv.exe, is the executable for running the MSMQ Triggers service. The second, Trigsnap.dll, is a snap-in DLL used in Microsoft Management Console (MMC) to manage triggers and define rules. The third, MSMQ Trigger Monitor (Trigmon.exe), is a troubleshooting application used to capture and display detailed trace and diagnostic information generated by the MSMQ Triggers Service.

MSMQ Triggers Topics

Files Required

For More Information

For more information about Message Queuing, search the
InternetMicrosoft Web site.