Many applications need asynchronous processing. The Message Queue service is used quite a lot in Microsoft environment and beyond. It works well. However, there is plenty room for improvements.
Service Broker is a message queuing system pushed down to the database level. This is exactly the place where it belongs to, in my opinion!
This way you can extend transactions asynchronously inside your stored procedures, and SQL Server maintains the whole process. Because SQL Server takes care about message processing, the process is very reliable and fast. All Service Broker objects are inside a database. Thus, they are securables as any other database objects. This means you can set up security in much grainer level comparing to independent queuing systems. The drawback is the Broker can handle conversations between SQL Server 2005 servers only. However, the architecture is open and prepared for usage in other systems as well, so we can expect further expansion of Service Broker.
All together, Service Broker is probably the most reliable, secure and fast system for asynchronous processing available now. If you need asynchronous processing, consider using Service Broker.
Latest posts by Dejan Sarka (see all)
- Python for SQL Server Specialists Part 4: Python and SQL Server - April 24, 2018
- Python for SQL Server Specialists Part 3: Graphs and Machine Learning - April 11, 2018
- Python for SQL Server Specialists Part 2: Working with Data - March 22, 2018