In many cases, it is appropriate to process messages as soon as they arrive in the queue. Apply in Service BrokerProgram, You can specify a stored procedure or external application, as long as a message arrives in a queue, immediately execute it. To some extent, it is like an asynchronous trigger in a queue.
Since SQL Server 2005, the service broker supports internal activation. That is, when a message arrives in the message queue, you can call the stored procedure. SQL Server 2008 supports external activation, that is, when a message arrives in the message queue, the message can be processed by an external application.
Microsoft SQL Server community samples: Service Broker http://sqlsrvsrvcbrkr.codeplex.com/
SQL Server 2008 service broker http://blogs.technet.com/ B /josebda/archive/2009/03/31/sql-server-2008-service-broker.aspx
Get started with using external activator http://blogs.msdn.com/ B/SQL _service_broker/archive/2009/05/18/get-started-with-using-external-activator.aspxUpdating appfabric cache via SQL Service Broker external activator http://blogs.msdn.com/ B /appfabriccat/archive/2010/10/27/updating-appfabric-cache-via-sql-service-broker-external-activator.aspx