Service Broker is designed around the basic functions of sending and receiving messages. Each message forms part of a conversation. Each conversation is a reliable, persistent communication channel. Each message and conversation has a specific type that Service Broker enforces to help developers write reliable applications.
New Transact-SQL statements let applications reliably send and receive these messages. An application sends messages to a service, which is a name for a set of related tasks. An application receives messages from a queue, which is a view of an internal table.
Messages for the same task are part of the same conversation. Within each conversation, Service Broker guarantees that an application receives each message exactly once, in the order in which the message was sent. The program that implements a service can associate related conversations for the same service in a conversation group, as described in Advantages of Service Broker.
Certificate-based security helps you protect sensitive messages and control access to services. An analogy is to think of Service Broker being like a postal service. To hold a conversation with a distant colleague, you can communicate by sending letters through the postal service. The postal service sorts and delivers the letters. You and your colleague then retrieve the letters from your mailboxes, read them, write responses, and send new letters until the conversation has ended. Letter delivery occurs asynchronously while you and your colleague handle other tasks.
Programs can use Service Broker like a postal service to support asynchronous conversations with other programs. The Service Broker messages function like letters. A Service Broker service is the address where the post office delivers the letters. Queues are the mailboxes that hold the letters after they are delivered. Applications receive the messages, act on the messages, and send responses.
When an application sends a message to a Service Broker service, it is isolated from the implementation details of the application on the other end of the conversation. The receiving application can be dynamically reconfigured or replaced with new code without affecting the sending application. The receiving application can even be shut down temporarily; the only impact will be that Service Broker keeps adding new messages to the queue until the receiving application is restarted.