Service Broker Activation

Service Broker activation helps applications to scale dynamically to match the message traffic. In general, an application uses activation if traffic to the service varies unpredictably or if the service must dynamically scale to match the traffic the service receives.

Activation uses Service Broker to start an application when there is work for the program to do.

There are two distinct types of activation: internal activation and external activation. Internal activation works with SQL Server stored procedures. In this case, Service Broker directly activates the stored procedure. External activation works with programs that run independently of SQL Server. For external activation, Service Broker produces a SQL Server event indicating that the external program should start another queue reader.

Not all Service Broker applications use activation. If an application requires substantial resources during startup, or if response time for infrequent messages is paramount, the application may be better designed to start when SQL Server starts and remain running. For tasks that are better performed at certain times, it may be better to design the application to run as a scheduled job. For more information on choosing a strategy to start an application that uses Service Broker, see Choosing a Startup Strategy.

In This Section

Topic Description

Understanding When Activation Occurs

Describes the two steps of the Service Broker activation process.

Internal Activation Context

Describes the execution context for a stored procedure that is started by internal activation.

Event-Based Activation

Describes the event and strategies for receiving and responding to the event

See Also

Other Resources

sys.dm_broker_activated_tasks
sys.dm_broker_queue_monitors

Help and Information

Getting SQL Server 2005 Assistance