Chapter 28. Getting asynchronous with Service Broker
SQL Server Service Broker is an asynchronous messaging system built into the database engine. Because it resides in the database, it fully complies with ACID (atomicity, consistency, isolation, durability) principles. Messages are stored, they can’t be lost, and they’re a part of the transactional system. Having a system like this in the database engine opens up a world of new possibilities in database programming. Quite a few things are implemented on the Service Broker architecture inside the database engine, such as event notifications, database mail, server-to-client notifications of changed data, and database mirroring.
Service Broker has been a part of SQL Server since its 2005 version, but it’s still not widely used. This may be due to the lack of a graphical user interface in SSMS, an overly complex setup, and the need to learn XML programming in SQL Server (all messages are in XML format). This is why I’ll give you a template that you can use for secure communication between two instances of SQL Server.