What is Service Broker in SQL Server and is it meaningful to enableitin a simple Database, Not in a distributed DB.
please do not close this question, I saw others similar question and non of them answered me.
What is Service Broker in SQL Server and is it meaningful to enableitin a simple Database, Not in a distributed DB.
please do not close this question, I saw others similar question and non of them answered me.
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 its 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 a 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.
Service Broker is a messaging system built into the SQL server db engine. Here's some articles you might read to see how it works.
Centralized Asynchronous Auditing with Service Broker
Centralized Asynchronous Auditing across Instances and Servers with Service Broker
How to troubleshoot Service Broker problems
Service Broker is an asynchronous messenging system. It allows you to send a message to a queue. Then some some worker process picks up the message. There are no guarantees about the order, or when, a message is picked up. But SQL Server does guarantee that message processing happens in a transactional way.
Asynchronous messenging is one of the heaviest architectures out there. You should consider carefully whether the added value is worth the complexity.