What is Service Broker in SQL Server and is it meaningful to enable it in a simple database, not in a distributed database?
What Is a Full-Service Broker? A full-service broker is a licensed financial broker-dealer firm that provides a large variety of services to its clients, including research and advice, retirement planning, tax tips, and much more.
Service Broker is a feature of SQL Server that monitors the completion of tasks, usually command messages, between two different applications in the database engine. It is responsible for the safe delivery of messages from one end to another.
SQL Service Broker is an extension mechanism that allows you to queue events for asynchronous processing.
There is no intrinsic harm in enabling the broker. If it's not used, it will just be idle.
It works in both simple and distributed DBs. A simple use case would be a logging queue. We used it at a client to queue XML messages to be processed asynchronously. So we push an XML to an InitatorQueue, and then had a service pull them from the queue, extract some necessary attributes via XPath, and insert them into a persistence table in our database.
Here is a good reference from Microsoft.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With