8.1. Service Broker

SQL Service Broker is one of the best recent features in SQL Server 2005 because it makes it possible to write queuing and message-based applications. With Service Broker, database developers can write asynchronous applications to communicate between databases or servers and can easily build distributed, secure, and reliable applications. Service Broker can take care of all the communication and messaging, enabling the developer to focus on the core problem domain. In addition, because Service Broker is part of the database engine, it encompasses many additional qualities such as transaction consistency, reliability, and security.

8.1.1. Service Broker Architecture

Service Broker is designed around the basic functions of sending and receiving messages. It helps developers build asynchronous, loosely coupled applications in which independent components work together to accomplish a task. Service Broker is a framework and extension to T-SQL, and can create and use the components for building reliable and scalable message-based applications. The core of Service Broker architecture is the concept of a dialog, which is a reliable, persistent, bi-directional, ordered exchange of messages between two endpoints. An endpoint is the sender or receiver of a message. For example, in Figure 8-1, Initiator is one endpoint of a conversation and Target is the other endpoint. You will learn more about endpoints later in this chapter. Figure 8-1 shows the basic architecture ...

Get Professional Microsoft® SQL Server® 2008 Administration now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.