The Microsoft SQL Server Service Broker External Activator (EA) is distributed in the Microsoft SQL Server 2008 Feature Pack. It is an extension of the internal activation feature and lets you move the logic for receiving and processing service broker messages from the database engine service to an application executable that runs outside the database engine service. This can provide a higher level of scale-out performance by moving processing loads from the database server to another computer. The activation application process can also run under a different windows account from the database engine process. This gives administrators additional control over the resources that the activation application can access. Installation packages for x86, x64, and ia64 architectures can be downloaded from here.
Specifically, here are a list of benefits a user can get from using EA:
· Access non-database resources such as files, network connections in their message processing applications
· Offload computation-intensive work out of SQL box and deploy it to a different machine
· Leverage legacy code libraries that are not accessible within T-SQL stored procedures
· Message processing solution that adapts and scales well by specifying the MIN and MAX number of instances of application processes to run
After installed, EA runs as a NT service. It watches the user configured notification queue for QUEUE_ACTIVATION events. As soon as a notification message is seen, it responds by launching an activation application specified in the configuration file to process messages received in the notification-related user queue. The notification queue, the user queue and the event notification associating them must be predefined before EA can run. A configuration file will tell EA which notification queue to watch on and what application to launch when a QUEUE_ACTIVATION event is received. In addition, a user can configure EA in a way that EA can launch enough number of application instances to consume messages from the user queue in a timely manner without a wasteful use of system resources.
In v1 release, EA only supports:
· Listening on a single notification service for queue activation events
· Only integrated security is allowed in notification database connection string. SQL login and password are not supported just yet.
· All user applications are launched under the same user credential as what EA is running under
Please check out more details on how to setup and start using EA by reading the installed user doc bin\<culture_code>\SSBEA.doc in your install folder (for example, the English culture code is EN).
We'll blog more about EA on topics such as configuration and deployment, tracing and trouble-shooting, some corner cases in our next several posts. Stay tuned! 🙂