As in queue sits idle, thread sleeps.
Queue receives a message, activation SP gets fired, activation SP raises an event which gets caught by event handler in code, which wakes up thread to do processing?
The activated procedure can be C# code (an assembly in the database). Once activated, your CLR code would be invoked in a thread inside SQL Server and can issue a RECEIVE (using SqlCommand) to retrive the messages from the queue.
If you want your C# code to be in an external application (an .EXE) then you should use external activation instead of internal activation. Have a look at the External Activator sample at http://www.codeplex.com/SQLSrvSrvcBrkr/
No comments:
Post a Comment