Archive for September 10th, 2009

Service Broker – Bookmarker September 10th, 2009

Vinod Kumar

Since SQL Server 2005 this feature of Service Broker has been in the outside world but in my opinion is an underutilized feature. In SQL Server 2008 the capabilities atleast from a UI has been addressed partially via the Management Studio which was one of the biggest drawback for using this feature. 

Quick Intro – Service Broker provides queuing, scalable and reliable messaging for inside SQL Server. Service Broker is used both for applications that use a single SQL Server instance and applications that distribute work across multiple instances. It is completely an asynchronous programming model which reduces the response time back to the application rather than getting blocked … For highly throughput systems this sort of reliable delivery and speed is very essential. There are multiple advantages of Service Broker when compared to other solutions like MSMQ, let me outline couple of them for you -

  1. Message ordering and coordination simplified
  2. Loose application coupling provides workload flexibility
  3. Related message locking allows more than one instance of an application to process messages from the same queue without explicit synchronization
  4. Automatic activation allows applications to scale with the message volume

and many more …

I thought of pointing you some of the awesome resources on SB from the product team already online.

SQLServer SSB Team Blog –

Remus’ blogs -

Service broker waitytpes

Securing dialogs with certificates

Poison Messages

Fire and forget

Reuse conversations

Recycle conversations

Resending messages

Troubleshooting dialogs

Error handling

Fast data push

Using multiple routes in service broker

Periodic tasks

Replacing certificates near expiration

Query Notification (SqlDependency)

Alter database set enable broker

Writing service broker stored procedures

Reusing dialogs with a dialog pool

Other MSDN resources that are also useful are -

Overview – An Introduction to SQL Server Service Broker  -

Links to Service Broker Architecture and Implementation –

Service Broker Tutorials –

Online Video Training

MSDN Webcast: Introducing Service Broker in SQL Server 2005—Level 200

Lastly, the Technet Site has several white papers, books, and blogs on Broker.

Continue reading...