Service Broker supports transactional asynchronous messaging within SQL Server. I separate queued work from the application that processes it.

Database Mail was the example in the original introduction. It uses a queued architecture, and its external program sends mail to an SMTP server. Service Broker itself is broader than an email sender and does not use SMTP to deliver its own database conversations.
Separate sending and processing
A transaction can enqueue a message with its database work. A receiver processes committed messages later. The applications don’t need to be active together. Routing, security and conversation handling still matter.
Services, queues, message types, contracts, and conversations give that work structure. Durable messaging does not excuse an application from handling errors or completing conversations.
Keep the historical comparison clear
SQL Server 2005 introduced SMTP-based Database Mail as an alternative to SQLMail’s older MAPI approach. That history explains the relationship. A new mail configuration still needs an environment-specific review.
Reference: Database Mail external program.
Related reading
A queued message is not completed business work, it is a committed request awaiting processing.
Published by Pinal Dave on SQLAuthority. More of my work at pinaldave.com.
Discover more from SQL Authority with Pinal Dave
Subscribe to get the latest posts sent to your email.





6 Comments. Leave new
can i get a walk through of service broker
or else where can i get the examples of service broker implementation
HI Pinal,
Nice Document given by you..
which may be very helpful in my project.
I have to fire automatic mail in project.
so thanks a lot for this doc…
hi, thanks for the great document, is it possible for me to send automated (daily)e-mails that gets the results of different stored procedures?
“Service Broker is message queuing for SQL Server. It is used for sending emails and through Database Mails.”…
So simplistic, Pinal… Is that all you want to say?
Hi pinal,
Thank you for sharing important stuff
Thanks Veeru.