Benefits of Programming with Service Broker
08/29/2025 Queuing and asynchronous messaging are needed for many database applications today.
Queuing and asynchronous messaging are needed for many database applications today.
Service Broker provides a queue-based durable messaging framework to address these needs.
Using the Transact-SQL API provided by Service Broker, you can easily develop services to
handle application requirements for queuing or asynchronous communications.
Some of the benefits of programming with Service Broker are:
You can write the programs used in a single distributed
application in multiple languages. Each program provides the functionality of each
distributed application component.
You can express security requirements via certificates, so application
components don’t need to share the same security context. Service Broker uses SQL
Server security features to help you secure your applications.
Message processing occurs within SQL Server transactions to
ensure data integrity. Service Broker supports remote transactional messaging over a
standard connection to the database.
Service Broker provides strong guarantees regarding the delivery
and processing of a related set of messages exactly once and in order, so there’s no
additional coding required to provide this functionality.
All of the data needed for a conversation, or a set of related
communications between two or more services, is persisted in SQL Server. Service Broker
supports clustering and database mirroring. A conversation can be maintained through
system restarts, server failover, network outages, and so on without failing or losing data.
Service Broker routing delivers messages based on the name of the
service, rather than on the network address of the computer where the service runs. This
allows you to install an application on multiple computers without changing application
code.
Service Broker uses Transact-SQL to create objects.
Applications that use Service Broker are most often implemented in Transact-SQL or
Microsoft.NET Framework-compatible languages. You don’t have to learn a new
language to create Service Broker applications.